1
1
mirror of https://github.com/jxnblk/mdx-deck.git synced 2024-11-29 13:58:02 +03:00

Remove unused code

This commit is contained in:
Brent Jackson 2019-03-09 23:11:49 -05:00
parent af9c2f9c57
commit 2798bfadaf

View File

@ -1,29 +1,6 @@
import React from 'react'
import Steps from './Steps'
import useSteps from './useSteps'
export const _Appear = props => {
const arr = React.Children.toArray(props.children)
return (
<Steps
length={arr.length}
render={({ step }) => {
const children = arr.map((child, i) =>
i < step
? child
: React.cloneElement(child, {
style: {
...child.props.style,
visibility: 'hidden',
},
})
)
return <>{children}</>
}}
/>
)
}
export const Appear = props => {
const arr = React.Children.toArray(props.children)
const step = useSteps(arr.length)