- Convert button, input, icon-button, toast, surface from flat-string
functions to slot-based { base: string } return pattern
- Convert section from bare TV exports to useSectionUI() with
{ wrapper, label } slots
- Remove standalone select helpers (selectTrigger, selectContent,
selectItem) in favor of useSelectUI()
- Delete use-component-ui.ts — no longer needed
- Update all 20+ call sites across property panels and chat components
22 lines
418 B
TypeScript
22 lines
418 B
TypeScript
import { tv } from 'tailwind-variants'
|
|
|
|
const section = tv({
|
|
slots: {
|
|
wrapper: 'border-b border-border px-3 py-2',
|
|
label: 'mb-1 block text-[11px] text-muted'
|
|
}
|
|
})
|
|
|
|
interface SectionUi {
|
|
wrapper?: string
|
|
label?: string
|
|
}
|
|
|
|
export function useSectionUI(ui?: SectionUi) {
|
|
const cls = section()
|
|
return {
|
|
wrapper: cls.wrapper({ class: ui?.wrapper }),
|
|
label: cls.label({ class: ui?.label })
|
|
}
|
|
}
|