feat: parent child retrieval (#12106)

Signed-off-by: -LAN- <laipz8200@outlook.com>
Co-authored-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
Wu Tianwei 2024-12-26 12:01:51 +08:00 • committed by GitHub
commit 49feff082f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
196 changed files with 9035 additions and 3115 deletions

View file

@ -0,0 +1,27 @@
import { type FC, Fragment } from 'react'
import type { Step } from './step'
import { StepperStep } from './step'
export type StepperProps = {
steps: Step[]
activeIndex: number
}
export const Stepper: FC<StepperProps> = (props) => {
const { steps, activeIndex } = props
return <div className='flex items-center gap-3'>
{steps.map((step, index) => {
const isLast = index === steps.length - 1
return (
<Fragment key={index}>
<StepperStep
{...step}
activeIndex={activeIndex}
index={index}
/>
{!isLast && <div className='w-4 h-px bg-divider-deep' />}
</Fragment>
)
})}
</div>
}