@bouko/react 2.2.9 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,5 +3,5 @@ type Props<T> = FieldProps<T> & {
|
|
|
3
3
|
rows?: number;
|
|
4
4
|
placeholder?: string;
|
|
5
5
|
};
|
|
6
|
-
export default function TextArea
|
|
6
|
+
export default function TextArea({ id, style, label, required, note, value, update, ...props }: Props<string>): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import Field from "./field";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return (_jsx(Field, { style: style, label: label, required: required, note: note, children: _jsx("textarea", { className: styles.textarea, onChange: ({ target: { value } }) => setField(update, id, value), ...props }) }));
|
|
3
|
+
export default function TextArea({ id, style, label, required = true, note, value, update, ...props }) {
|
|
4
|
+
return (_jsx(Field, { style: style, label: label, required: required, note: note, children: _jsx("textarea", { className: styles.textarea, onChange: ({ target: { value } }) => update(value), value: value ?? "", ...props }) }));
|
|
6
5
|
}
|
|
7
6
|
const styles = {
|
|
8
7
|
container: "flex flex-col gap-1 overflow-hidden",
|