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

PasswordInputField

Component

import { PasswordInputField } from 'grommet-controls';

Main

() => (
<Form
onSubmit={() => console.log('onSubmit')}
pad={{ horizontal: 'small' }}
focusFirstChild={false}
>
<PasswordInputField
label="Password"
name="password"
validation={[validators.required()]}
/>
<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
react
^17.0.1
React
*

Internal dependencies

file
imports
"../PasswordInput"
PasswordInputIPasswordInputProps
"../WithFormField"
WithFormFieldIWithFormFieldProps

Component JSX

<WithFormField
>
WithFormField
from"../WithFormField"
<PasswordInput
/>
PasswordInput
from"../PasswordInput"

Stories

In Field

() => (
<Form
onSubmit={() => console.log('onSubmit')}
pad={{ horizontal: 'small' }}
focusFirstChild={false}
>
<PasswordInputField
label="Password"
name="password"
inField={false}
validation={[validators.required()]}
/>
<Box pad="small">
<Button type="submit" label="Submit" />
</Box>
</Form>
)

Validation

() => (
<Form
onSubmit={() => console.log('onSubmit')}
pad={{ horizontal: 'small' }}
focusFirstChild={false}
>
<PasswordInputField
label="Password"
name="password"
validation={[
validators.required(),
validators.minLength(8),
validators.alphaNumeric(),
]}
/>
<Box pad="small">
<Button type="submit" label="Submit" />
</Box>
</Form>
)