@veracity/vui
Version:
Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.
26 lines (24 loc) • 860 B
JavaScript
import { isString } from "../utils/assertion.js";
import { useStyleConfig } from "../core/theme.js";
import { Label } from "../label/label.js";
import { useSelectContext } from "./context.js";
import { jsx } from "react/jsx-runtime";
//#region src/select/selectLabel.tsx
const SelectLabel = ({ disabled, id, label, labelMarkOptional, labelTooltipText }) => {
const styles = useStyleConfig("Select", useSelectContext());
return isString(label) ? /* @__PURE__ */ jsx(Label, {
"aria-disabled": disabled,
className: "vui-input-label",
htmlFor: id,
markAsOptional: labelMarkOptional,
mb: .5,
text: label,
tooltipText: labelTooltipText,
...styles.label
}) : label;
};
SelectLabel.displayName = "SelectLabel";
//#endregion
export { SelectLabel, SelectLabel as default };
globalThis.__vuiVersion__ = "5.3.1"
//# sourceMappingURL=selectLabel.js.map