📝(react) react-hook-form forms Sports examples

Our forms needs to be usable with react-hook-form
This commit is contained in:
Romain Le Cellier
2023-08-01 15:07:30 +02:00
parent d0941ae0a7
commit 5dde74c10d
2 changed files with 182 additions and 52 deletions

View File

@@ -35,7 +35,8 @@ export const RadioGroup = ({
state,
text,
rightText,
}: PropsWithChildren & FieldProps) => {
style,
}: PropsWithChildren & FieldProps & { style: React.CSSProperties }) => {
return (
<Field
className="c__radio__group c__checkbox__group"
@@ -44,7 +45,9 @@ export const RadioGroup = ({
rightText={rightText}
compact={true}
>
<div className="c__checkbox__group__list">{children}</div>
<div className="c__checkbox__group__list" style={style}>
{children}
</div>
</Field>
);
};