mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-28 17:07:22 +00:00
* updating File picker Text input Text area DateRangePicker Datepicker PasswordInput NumberInput TextInput codeEditor, to include border radius style option * change to number input * theme file updated to remove override for border radius * change to number input * text input updated with border radius style * updated with border radius * date range picker border radius removed * removing overiding class
27 lines
792 B
JavaScript
27 lines
792 B
JavaScript
import React, { useEffect } from 'react';
|
|
|
|
export const TextArea = function TextArea({ height, properties, exposedVariables, styles, setExposedVariable }) {
|
|
useEffect(() => {
|
|
setExposedVariable('value', properties.value);
|
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
}, [properties.value]);
|
|
|
|
return (
|
|
<textarea
|
|
disabled={styles.disabledState}
|
|
onChange={(e) => {
|
|
setExposedVariable('value', e.target.value);
|
|
}}
|
|
type="text"
|
|
className="form-control textarea"
|
|
placeholder={properties.placeholder}
|
|
style={{
|
|
height,
|
|
resize: 'none',
|
|
display: styles.visibility ? '' : 'none',
|
|
borderRadius: `${styles.borderRadius}px`,
|
|
}}
|
|
value={exposedVariables.value}
|
|
></textarea>
|
|
);
|
|
};
|