UNPKG

@julo-ui/textarea

Version:

A React Component for Text Area Field

34 lines (31 loc) 914 B
import { textAreaCx } from "./chunk-JVR6TQ2G.mjs"; // src/TextArea.tsx import { forwardRef, julo, cx } from "@julo-ui/system"; import { useFormControl } from "@julo-ui/form-control"; import Typography from "@julo-ui/typography"; import { jsx } from "react/jsx-runtime"; var TextArea = forwardRef((props, ref) => { const { className, isResizeable = true, sx, ...resProps } = props; const textareaProps = useFormControl(resProps); return /* @__PURE__ */ jsx(Typography, { type: "body", size: "small", asChild: true, children: /* @__PURE__ */ jsx( julo.textarea, { ref, className: cx("julo-textarea", className), sx: { resize: isResizeable ? "both" : "none", ...sx }, ...textareaProps, __css: textAreaCx } ) }); }); TextArea.id = "textarea"; TextArea.displayName = "TextArea"; var TextArea_default = TextArea; export { TextArea_default };