97a3c84625
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>
48 lines
969 B
TypeScript
48 lines
969 B
TypeScript
import * as React from 'react'
|
|
import { ActionIcon, Tooltip } from '@mantine/core'
|
|
import type { MantineSize, MantineColor } from '@mantine/core'
|
|
|
|
interface FnActionIconProps {
|
|
icon: React.ReactNode
|
|
variant?: 'filled' | 'light' | 'outline' | 'transparent' | 'default' | 'subtle'
|
|
size?: MantineSize | number
|
|
color?: MantineColor
|
|
onClick?: React.MouseEventHandler<HTMLButtonElement>
|
|
loading?: boolean
|
|
disabled?: boolean
|
|
tooltip?: string
|
|
}
|
|
|
|
function FnActionIcon({
|
|
icon,
|
|
variant = 'default',
|
|
size = 'md',
|
|
color,
|
|
onClick,
|
|
loading,
|
|
disabled,
|
|
tooltip,
|
|
}: FnActionIconProps) {
|
|
const button = (
|
|
<ActionIcon
|
|
variant={variant}
|
|
size={size}
|
|
color={color}
|
|
onClick={onClick}
|
|
loading={loading}
|
|
disabled={disabled}
|
|
>
|
|
{icon}
|
|
</ActionIcon>
|
|
)
|
|
|
|
if (tooltip) {
|
|
return <Tooltip label={tooltip}>{button}</Tooltip>
|
|
}
|
|
|
|
return button
|
|
}
|
|
|
|
export { FnActionIcon }
|
|
export type { FnActionIconProps }
|