Files
fn_registry/frontend/functions/ui/segmented_control.tsx
egutierrez 2d108c295a refactor: migrate frontend from shadcn/Tailwind to Mantine v9
Reescribe todos los componentes UI para usar Mantine v9 en lugar de shadcn/Tailwind.
Elimina cn(), CVA, components.json, theme_provider custom y globals.css con Tailwind.
Añade 25+ componentes nuevos (AppShell, AuthForm, DatePickerInput, Dropzone, etc.)
y MantineProvider como wrapper estándar del sistema de temas.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 23:46:44 +02:00

40 lines
753 B
TypeScript

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 }