diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-09-22 19:34:01 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-10-24 12:23:48 +0200 |
| commit | a6ff5eee45215effb3344cb5d631a27a7c0369aa (patch) | |
| tree | 5051747acf72318b4fc5c18d603e3757fbefdfdb /src/components/organisms/toolbar/main-nav.tsx | |
| parent | 651ea4fc992e77d2f36b3c68f8e7a70644246067 (diff) | |
refactor(components): rewrite form components
Diffstat (limited to 'src/components/organisms/toolbar/main-nav.tsx')
| -rw-r--r-- | src/components/organisms/toolbar/main-nav.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/organisms/toolbar/main-nav.tsx b/src/components/organisms/toolbar/main-nav.tsx index cf49bd4..4182b4c 100644 --- a/src/components/organisms/toolbar/main-nav.tsx +++ b/src/components/organisms/toolbar/main-nav.tsx @@ -18,7 +18,7 @@ export type MainNavProps = { /** * The button state. */ - isActive: BooleanFieldProps['checked']; + isActive: BooleanFieldProps['isChecked']; /** * The main nav items. */ @@ -30,7 +30,7 @@ export type MainNavProps = { }; const MainNavWithRef: ForwardRefRenderFunction<HTMLDivElement, MainNavProps> = ( - { className = '', isActive, items, setIsActive }, + { className = '', isActive = false, items, setIsActive }, ref ) => { const intl = useIntl(); @@ -49,9 +49,9 @@ const MainNavWithRef: ForwardRefRenderFunction<HTMLDivElement, MainNavProps> = ( return ( <div className={`${sharedStyles.item} ${mainNavStyles.item}`} ref={ref}> <BooleanField - checked={isActive} className={`${sharedStyles.checkbox} ${mainNavStyles.checkbox}`} id="main-nav-button" + isChecked={isActive} name="main-nav-button" onChange={setIsActive} type="checkbox" |
