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:
parent
af9c2f9c57
commit
2798bfadaf
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user