welcome-ui
Version:
Customizable design system with react • styled-components • styled-system and ariakit.
55 lines (54 loc) • 1.1 kB
JavaScript
"use client";
import { j as u } from "./jsx-runtime-Bqq1Hxg9.mjs";
import { shouldForwardProp as w, forwardRef as g } from "./System.mjs";
import j, { th as y, css as T } from "@xstyled/styled-components";
import { d as $ } from "./field-styles-CfVLcVQp.mjs";
const F = j.textareaBox.withConfig({ shouldForwardProp: w })(
({ size: t, variant: e }) => T`
${$({ size: t, variant: e })};
${y("textareas")};
line-height: lg;
`
), R = g(
({
autoFocus: t,
dataTestId: e,
disabled: r,
maxLength: a,
minRows: o = 5,
name: s,
onBlur: i,
onChange: d,
onFocus: m,
onKeyDown: x,
placeholder: l,
size: f = "md",
value: p,
variant: n,
...h
}, c) => /* @__PURE__ */ u.jsx(
F,
{
autoFocus: t,
"data-testid": e,
disabled: r,
maxLength: a,
name: s,
onBlur: i,
onChange: d,
onFocus: m,
onKeyDown: x,
placeholder: l,
ref: c,
rows: o,
size: f,
value: p,
variant: n,
...h
}
)
);
R.displayName = "Textarea";
export {
R as Textarea
};