Label: add support for kobalte select
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
div.form-label {
|
div.form-label {
|
||||||
@apply flex flex-col gap-1 w-full;
|
@apply flex flex-col gap-1 w-full;
|
||||||
|
|
||||||
|
& > span,
|
||||||
& > label,
|
& > label,
|
||||||
& > div {
|
& > div {
|
||||||
@apply w-full;
|
@apply w-full;
|
||||||
@@ -8,12 +9,14 @@ div.form-label {
|
|||||||
@apply leading-none;
|
@apply leading-none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
& > span,
|
||||||
& > label {
|
& > label {
|
||||||
@apply flex items-center gap-1;
|
@apply flex items-center gap-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
& > span[data-required]:not(span[data-readonly]),
|
||||||
& > label[data-required]:not(label[data-readonly]) {
|
& > label[data-required]:not(label[data-readonly]) {
|
||||||
span.typography::after {
|
.typography::after {
|
||||||
@apply fg-def-4 ml-1;
|
@apply fg-def-4 ml-1;
|
||||||
|
|
||||||
content: "*";
|
content: "*";
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import Icon from "@/src/components/Icon/Icon";
|
|||||||
import { TextField } from "@kobalte/core/text-field";
|
import { TextField } from "@kobalte/core/text-field";
|
||||||
import { Checkbox } from "@kobalte/core/checkbox";
|
import { Checkbox } from "@kobalte/core/checkbox";
|
||||||
import { Combobox } from "@kobalte/core/combobox";
|
import { Combobox } from "@kobalte/core/combobox";
|
||||||
|
import { Select } from "@kobalte/core/select";
|
||||||
import "./Label.css";
|
import "./Label.css";
|
||||||
|
|
||||||
export type Size = "default" | "s";
|
export type Size = "default" | "s";
|
||||||
@@ -12,11 +13,14 @@ export type Size = "default" | "s";
|
|||||||
export type LabelComponent =
|
export type LabelComponent =
|
||||||
| typeof TextField.Label
|
| typeof TextField.Label
|
||||||
| typeof Checkbox.Label
|
| typeof Checkbox.Label
|
||||||
| typeof Combobox.Label;
|
| typeof Combobox.Label
|
||||||
|
| typeof Select.Label;
|
||||||
|
|
||||||
export type DescriptionComponent =
|
export type DescriptionComponent =
|
||||||
| typeof TextField.Description
|
| typeof TextField.Description
|
||||||
| typeof Checkbox.Description
|
| typeof Checkbox.Description
|
||||||
| typeof Combobox.Description;
|
| typeof Combobox.Description
|
||||||
|
| typeof Select.Description;
|
||||||
|
|
||||||
export interface LabelProps {
|
export interface LabelProps {
|
||||||
labelComponent: LabelComponent;
|
labelComponent: LabelComponent;
|
||||||
|
|||||||
Reference in New Issue
Block a user