Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix chakra example
  • Loading branch information
erikras committed Nov 18, 2019
1 parent 679ce59 commit 32c17d6
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions examples/chakra/index.js
Expand Up @@ -20,7 +20,6 @@ import {
Radio,
RadioGroup,
Stack,
CheckboxGroup,
Textarea
} from '@chakra-ui/core'
import { Form, Field, useField, useForm } from 'react-final-form'
Expand Down Expand Up @@ -187,36 +186,6 @@ const CheckboxArrayControl = ({ name, value, children }) => {
)
}

const AdaptedCheckboxGroup = ({ input, meta, label, children }) => (
<FormControl isInvalid={meta.touched && meta.invalid} my={4}>
<FormLabel htmlFor={input.name}>{label}</FormLabel>
<CheckboxGroup
{...input}
onChange={values => {
input.onChange(values)
}}
isInvalid={meta.touched && meta.invalid}
my={4}
>
{children}
</CheckboxGroup>
<FormErrorMessage>{meta.error}</FormErrorMessage>
</FormControl>
)

const AdaptedBooleanCheckbox = ({ input, meta, label }) => (
<FormControl isInvalid={meta.touched && meta.invalid} my={4}>
<Checkbox
{...input}
isChecked={input.checked}
isInvalid={meta.touched && meta.invalid}
>
{label}
</Checkbox>
<FormErrorMessage>{meta.error}</FormErrorMessage>
</FormControl>
)

const AdaptedRadioGroup = ({ input, meta, label, children }) => (
<FormControl isInvalid={meta.touched && meta.invalid} my={4}>
<FormLabel htmlFor={input.name}>{label}</FormLabel>
Expand Down

0 comments on commit 32c17d6

Please sign in to comment.