initial: mirror of @fn_library from fn_registry
75 components + DESIGN_SYSTEM.md + sync script. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
import * as React from 'react'
|
||||
import { Stepper } from '@mantine/core'
|
||||
|
||||
interface StepDef {
|
||||
label: string
|
||||
description?: string
|
||||
icon?: React.ReactNode
|
||||
}
|
||||
|
||||
interface FnStepperProps {
|
||||
steps: StepDef[]
|
||||
active: number
|
||||
onStepClick?: (step: number) => void
|
||||
orientation?: 'horizontal' | 'vertical'
|
||||
allowNextStepsSelect?: boolean
|
||||
}
|
||||
|
||||
function FnStepper({
|
||||
steps,
|
||||
active,
|
||||
onStepClick,
|
||||
orientation = 'horizontal',
|
||||
allowNextStepsSelect = false,
|
||||
}: FnStepperProps) {
|
||||
return (
|
||||
<Stepper
|
||||
active={active}
|
||||
onStepClick={onStepClick}
|
||||
orientation={orientation}
|
||||
allowNextStepsSelect={allowNextStepsSelect}
|
||||
>
|
||||
{steps.map((step, i) => (
|
||||
<Stepper.Step
|
||||
key={i}
|
||||
label={step.label}
|
||||
description={step.description}
|
||||
icon={step.icon}
|
||||
/>
|
||||
))}
|
||||
</Stepper>
|
||||
)
|
||||
}
|
||||
|
||||
export { FnStepper }
|
||||
export type { FnStepperProps, StepDef }
|
||||
Reference in New Issue
Block a user