ToolJet/frontend/src/Editor/Components/TextArea.jsx
Kiran Ashok c836d861cf
Border radius style for input widgets (#1972)
* 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
2022-01-29 07:06:08 +05:30

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>
);
};