diff --git a/pkgs/clan-app/ui/src/components/Form/Label.css b/pkgs/clan-app/ui/src/components/Form/Label.css index c90a55955..f52b3f494 100644 --- a/pkgs/clan-app/ui/src/components/Form/Label.css +++ b/pkgs/clan-app/ui/src/components/Form/Label.css @@ -1,6 +1,7 @@ div.form-label { @apply flex flex-col gap-1 w-full; + & > span, & > label, & > div { @apply w-full; @@ -8,12 +9,14 @@ div.form-label { @apply leading-none; } + & > span, & > label { @apply flex items-center gap-1; } + & > span[data-required]:not(span[data-readonly]), & > label[data-required]:not(label[data-readonly]) { - span.typography::after { + .typography::after { @apply fg-def-4 ml-1; content: "*"; diff --git a/pkgs/clan-app/ui/src/components/Form/Label.tsx b/pkgs/clan-app/ui/src/components/Form/Label.tsx index 788a494af..6b6775b6a 100644 --- a/pkgs/clan-app/ui/src/components/Form/Label.tsx +++ b/pkgs/clan-app/ui/src/components/Form/Label.tsx @@ -5,6 +5,7 @@ import Icon from "@/src/components/Icon/Icon"; import { TextField } from "@kobalte/core/text-field"; import { Checkbox } from "@kobalte/core/checkbox"; import { Combobox } from "@kobalte/core/combobox"; +import { Select } from "@kobalte/core/select"; import "./Label.css"; export type Size = "default" | "s"; @@ -12,11 +13,14 @@ export type Size = "default" | "s"; export type LabelComponent = | typeof TextField.Label | typeof Checkbox.Label - | typeof Combobox.Label; + | typeof Combobox.Label + | typeof Select.Label; + export type DescriptionComponent = | typeof TextField.Description | typeof Checkbox.Description - | typeof Combobox.Description; + | typeof Combobox.Description + | typeof Select.Description; export interface LabelProps { labelComponent: LabelComponent;