@veracity/vui
Version:
Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.
27 lines (25 loc) • 859 B
JavaScript
import { cs } from "../utils/styles.js";
import { useStyleConfig } from "../core/theme.js";
import vui from "../core/vui.js";
import { T } from "../t/t.js";
import { useSwitchContext } from "./context.js";
import { jsx } from "react/jsx-runtime";
//#region src/switch/switchLabel.tsx
/** Displays label text within the Switch component. */
const SwitchLabel = vui((props, ref) => {
const { className, ...rest } = props;
const styles = useStyleConfig("Switch", useSwitchContext());
if (styles.label.size === "xl") rest.fontSize = 20;
return /* @__PURE__ */ jsx(T, {
className: cs("vui-switchLabel", className),
display: "flex",
ref,
...styles.label,
...rest
});
});
SwitchLabel.displayName = "SwitchLabel";
//#endregion
export { SwitchLabel, SwitchLabel as default };
globalThis.__vuiVersion__ = "5.3.1"
//# sourceMappingURL=switchLabel.js.map