@crossed/ui
Version:
A universal & performant styling library for React Native, Next.js & React
20 lines (19 loc) • 807 B
JavaScript
import { jsx, jsxs } from "react/jsx-runtime";
import { memo } from "react";
import { form } from "../../styles/form";
import { XBox } from "../../layout/XBox";
import { Text } from "../../typography/Text";
import { FormLabel } from "../../forms/Form";
const SelectLabel = memo(
({ label, description, extra }) => {
return label || description || extra ? /* @__PURE__ */ jsxs(XBox, { alignItems: "center", space: "xxs", children: [
!!label && /* @__PURE__ */ jsx(FormLabel, { children: label }),
!!description && /* @__PURE__ */ jsx(Text, { style: form.labelDescription, children: description }),
!!extra && /* @__PURE__ */ jsx(Text, { style: form.labelExtra, textAlign: "right", children: extra })
] }) : null;
}
);
export {
SelectLabel
};
//# sourceMappingURL=Label.js.map