Update textarea component

This commit is contained in:
Hazem Krimi
2021-04-21 00:28:20 +01:00
parent 7a289a6143
commit 1f50022c64
2 changed files with 9 additions and 3 deletions
+8 -2
View File
@@ -16,7 +16,7 @@ type TextAreaProps = {
error?: boolean; error?: boolean;
errorMessage?: string; errorMessage?: string;
value: string; value: string;
label: string; label?: string;
placeholder?: string; placeholder?: string;
fullWidth?: boolean; fullWidth?: boolean;
onChange: (event: React.ChangeEvent<HTMLTextAreaElement>) => void; onChange: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;
@@ -25,6 +25,7 @@ type TextAreaProps = {
const TextArea = ({ const TextArea = ({
color = 'client', color = 'client',
label, label,
placeholder,
value, value,
onChange, onChange,
error, error,
@@ -46,7 +47,12 @@ const TextArea = ({
)} )}
</div> </div>
<div className='textarea'> <div className='textarea'>
<textarea rows={10} value={value} onChange={onChange} /> <textarea
rows={10}
value={value}
onChange={onChange}
placeholder={placeholder}
/>
</div> </div>
</Wrapper> </Wrapper>
); );
+1 -1
View File
@@ -14,7 +14,7 @@ type WrapperProps = {
| 'white'; | 'white';
error?: boolean; error?: boolean;
errorMessage?: string; errorMessage?: string;
label: string; label?: string;
fullWidth?: boolean; fullWidth?: boolean;
}; };