Label: add support for kobalte select
This commit is contained in:
@@ -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: "*";
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user