@@ -2,7 +2,11 @@ import {useEffect, useState} from 'react'
22
33import PropTypes from 'prop-types'
44
5- import AtomTextarea , { AtomTextareaSizes as SIZES , AtomTextareaStates } from '@s-ui/react-atom-textarea'
5+ import AtomTextarea , {
6+ AtomTextareaResizes as RESIZES ,
7+ AtomTextareaSizes as SIZES ,
8+ AtomTextareaStates
9+ } from '@s-ui/react-atom-textarea'
610import MoleculeField from '@s-ui/react-molecule-field'
711
812import { BASE_CLASS } from './config.js'
@@ -31,6 +35,7 @@ const MoleculeTextareaField = ({
3135 nodeLabel,
3236 maxChars = 4000 ,
3337 onChange = NOOP ,
38+ resize,
3439 successText,
3540 textCharacters = 'characters' ,
3641 value = '' ,
@@ -86,7 +91,14 @@ const MoleculeTextareaField = ({
8691 onChange = { onChangeHandler }
8792 disabled = { disabled }
8893 >
89- < AtomTextarea id = { id } errorState = { errorState } state = { textAreaState } value = { internalValue } { ...props } />
94+ < AtomTextarea
95+ id = { id }
96+ errorState = { errorState }
97+ resize = { resize }
98+ state = { textAreaState }
99+ value = { internalValue }
100+ { ...props }
101+ />
90102 </ MoleculeField >
91103 )
92104}
@@ -143,9 +155,13 @@ MoleculeTextareaField.propTypes = {
143155 autoHideHelpText : PropTypes . bool ,
144156
145157 /** Prop to handle if the user can exceed the maxChars length */
146- isMaxCharBlocked : PropTypes . bool
158+ isMaxCharBlocked : PropTypes . bool ,
159+
160+ /** Resize property for the textarea */
161+ resize : PropTypes . oneOf ( Object . values ( RESIZES ) )
147162}
148163
149164export default MoleculeTextareaField
150165
151166export const MoleculeTextareaSizes = SIZES
167+ export const MoleculeTextareaResizes = RESIZES
0 commit comments