openpencil/src/components/ui/section.ts
Danila Poyarkov 862c0f28dc Unify UI styling to slot-based useXxxUI() pattern
- 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
2026-04-06 22:58:34 +03:00

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 })
}
}