A pack of extensions for grommet 2
created:7/7/2021
updated:7/7/2021
loc
12
comments
25%
passed
2
failed
4
coverage
100%

TextAreaField

Component

import { TextAreaField } from 'grommet-controls';

Main

() => (
<Form
onSubmit={() => console.log('onSubmit')}
pad={{ horizontal: 'small' }}
focusFirstChild={false}
>
<TextAreaField rows={3} label="Short bio" name="bio" />
<Box pad="small">
<Button type="submit" label="Submit" />
</Box>
</Form>
)

Commits

Date
Author
Commit Message
8/30/2020

atanasster

avatar of atanasster
update eslint and add component-controls
8/27/2019

atanasster

avatar of atanasster
initial commit 2.x alpha
2 commits

External dependencies

package
imports
peer
grommet
^2.15.0
TextAreaPropsTextArea
*
react
^17.0.1
React
*

Internal dependencies

file
imports
"../WithFormField"
WithFormFieldIWithFormFieldProps

Component JSX

<WithFormField
>
WithFormField
from"../WithFormField"
<TextArea
/>
grommet
^2.15.0

Stories

In Field

() => (
<Form
onSubmit={() => console.log('onSubmit')}
pad={{ horizontal: 'small' }}
focusFirstChild={false}
>
<TextAreaField rows={6} label="Short bio" name="bio" inField={false} />
<Box pad="small">
<Button type="submit" label="Submit" />
</Box>
</Form>
)

Validation

() => (
<Form
onSubmit={() => console.log('onSubmit')}
pad={{ horizontal: 'small' }}
focusFirstChild={false}
>
<TextAreaField
rows={6}
label="Short bio"
name="bio"
validation={[validators.required()]}
/>
<Box pad="small">
<Button type="submit" label="Submit" />
</Box>
</Form>
)