mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-12-04 22:21:21 +09:00
Refactor: move component styling out of inline Tailwind/CVA classes into SCSS utility classes. Many UI components (dialog, alert-dialog, card, button, badge, checkbox, input, label, select, sheet, switch, table, tabs, textarea, etc.) now use stable .ui-*-prefixed classes and data-slot/data-variant attributes. Removed several class-variance-authority usages and simplified JS by mapping variant/size to SCSS classes (e.g. Button.buttonVariants) and adding a backwards-compat shim for badgeVariants. Added a new styles/components/_ui.scss containing the style surface for the .ui-* classes and expanded styles/components/_buttons.scss to implement the new button API. main.scss now imports the new _ui.scss. Small behavioral tweaks: Radix primitives keep animation-related attributes, icon sizing cleaned up (removed many explicit size classes), and sheet/dialog close buttons use .ui-* classes. Overall this centralizes geometry/color in SCSS and keeps JSX as thin wrappers.
16 lines
273 B
React
16 lines
273 B
React
import * as React from 'react';
|
|
import { cn } from '@/lib/utils';
|
|
|
|
function Input({ className, type, ...props }) {
|
|
return (
|
|
<input
|
|
type={type}
|
|
data-slot="input"
|
|
className={cn('ui-input', className)}
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|
|
|
|
export { Input };
|