@spark-ui/components
Version:
Spark (Leboncoin design system) components.
52 lines (49 loc) • 1.29 kB
JavaScript
// src/label/Label.tsx
import { cx } from "class-variance-authority";
import { Label as RadixLabel } from "radix-ui";
import { jsx } from "react/jsx-runtime";
var Label = ({ className, ref, ...others }) => {
return /* @__PURE__ */ jsx(
RadixLabel.Label,
{
ref,
"data-spark-component": "label",
className: cx("text-body-1", className),
...others
}
);
};
Label.displayName = "Label";
// src/label/LabelRequiredIndicator.tsx
import { cx as cx2 } from "class-variance-authority";
import { jsx as jsx2 } from "react/jsx-runtime";
var LabelRequiredIndicator = ({
className,
children = "*",
ref,
...others
}) => {
return /* @__PURE__ */ jsx2(
"span",
{
ref,
"data-spark-component": "label-required-indicator",
role: "presentation",
"aria-hidden": "true",
className: cx2(className, "text-caption text-on-surface/dim-1"),
...others,
children
}
);
};
LabelRequiredIndicator.displayName = "Label.RequiredIndicator";
// src/label/index.ts
var Label2 = Object.assign(Label, {
RequiredIndicator: LabelRequiredIndicator
});
Label2.displayName = "Label";
LabelRequiredIndicator.displayName = "Label.RequiredIndicator";
export {
Label2 as Label
};
//# sourceMappingURL=chunk-HLXYG643.mjs.map