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,39 @@
|
||||
import { SegmentedControl } from '@mantine/core'
|
||||
import type { MantineSize, MantineColor } from '@mantine/core'
|
||||
|
||||
interface SegmentedItem {
|
||||
value: string
|
||||
label: string
|
||||
}
|
||||
|
||||
interface FnSegmentedControlProps {
|
||||
data: SegmentedItem[]
|
||||
value?: string
|
||||
onChange?: (value: string) => void
|
||||
fullWidth?: boolean
|
||||
size?: MantineSize
|
||||
color?: MantineColor
|
||||
}
|
||||
|
||||
function FnSegmentedControl({
|
||||
data,
|
||||
value,
|
||||
onChange,
|
||||
fullWidth = false,
|
||||
size = 'sm',
|
||||
color,
|
||||
}: FnSegmentedControlProps) {
|
||||
return (
|
||||
<SegmentedControl
|
||||
data={data}
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
fullWidth={fullWidth}
|
||||
size={size}
|
||||
color={color}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
export { FnSegmentedControl }
|
||||
export type { FnSegmentedControlProps, SegmentedItem }
|
||||
Reference in New Issue
Block a user