Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
DFG Study
UI
Commits
7c04813d
Commit
7c04813d
authored
Nov 14, 2021
by
v.mattfeld
Browse files
Form styles
parent
238a873a
Changes
1
Hide whitespace changes
Inline
Side-by-side
components/Form.tsx
View file @
7c04813d
import
React
,
{
FC
,
useCallback
,
useEffect
,
useState
}
from
'
react
'
;
import
{
Box
,
Button
,
Stack
,
Radio
}
from
"
@chakra-ui/react
"
;
import
{
Box
,
Button
,
Stack
,
Radio
,
Flex
,
Spacer
}
from
"
@chakra-ui/react
"
;
import
{
useRouter
}
from
'
next/router
'
;
import
{
Formik
}
from
'
formik
'
;
import
{
CheckboxControl
,
CheckboxContainer
,
RadioGroupControl
}
from
"
formik-chakra-ui
"
;
...
...
@@ -224,23 +224,30 @@ const Form: FC<FormProps> = ({ pageNumber, uid, imageID, refetch, isCheck }) =>
<
CheckboxControl
isDisabled
=
{
values
.
targetDemographic
.
indexOf
(
'
Nobody
'
)
!==
-
1
}
name
=
"targetDemographic"
value
=
"Everybody"
>
{
t
(
'
a26
'
)
}
</
CheckboxControl
>
</
Stack
>
</
CheckboxContainer
>
<
Stack
my
=
{
5
}
spacing
=
{
20
}
direction
=
"row"
>
<
Button
size
=
"md"
rounded
=
"full"
color
=
"white"
bg
=
"red.400"
_hover
=
{
{
bg
:
'
red.300
'
}
}
type
=
"submit"
isLoading
=
{
isSubmitting
}
>
{
t
(
'
submit
'
)
}
</
Button
>
<
Button
onClick
=
{
()
=>
{
handleReset
()
refetch
()
}
}
>
Reset
</
Button
>
</
Stack
>
<
Flex
my
=
{
8
}
>
<
Box
>
<
Button
size
=
"md"
rounded
=
"full"
color
=
"white"
bg
=
"red.400"
_hover
=
{
{
bg
:
'
red.300
'
}
}
type
=
"submit"
isLoading
=
{
isSubmitting
}
>
{
t
(
'
submit
'
)
}
</
Button
>
</
Box
>
<
Spacer
/>
<
Box
>
<
Button
mr
=
'0'
onClick
=
{
()
=>
{
handleReset
()
refetch
()
}
}
>
Reset
</
Button
>
</
Box
>
</
Flex
>
</
Box
>
)
}
</
Formik
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment