@veracity/vui
Version:
Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.
30 lines (28 loc) • 953 B
JavaScript
import vui from "../core/vui.js";
import { TextField } from "../textField/textField.js";
import { useEffect } from "react";
import { jsx } from "react/jsx-runtime";
//#region src/textarea/textarea.tsx
/**
* @deprecated Use `TextField` with a `rows` prop instead. `Textarea` is a thin wrapper kept for
* backward compatibility and will be removed in a future major version.
*/
const Textarea = vui((props, ref) => {
const { resize, rows, textareaProps, textareaRef, ...rest } = props;
useEffect(() => {
console.warn("[Textarea] is deprecated. Use `TextField` with a `rows` prop instead.");
}, []);
return /* @__PURE__ */ jsx(TextField, {
fieldProps: textareaProps,
fieldRef: textareaRef,
ref,
resize: !!resize && resize !== "none",
rows: rows ?? 2,
...rest
});
});
Textarea.displayName = "Textarea";
//#endregion
export { Textarea, Textarea as default };
globalThis.__vuiVersion__ = "5.4.0-alpha"
//# sourceMappingURL=textarea.js.map