aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules/buttons/main-nav-button.test.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-04-12 15:48:47 +0200
committerArmand Philippot <git@armandphilippot.com>2022-04-12 15:48:47 +0200
commitff3a251e75fafce7d95177010401483127973313 (patch)
tree9a0c9e0ff3f8525bf138287b41ac0527551389fd /src/components/molecules/buttons/main-nav-button.test.tsx
parent714273556f5278746a4022d0e87153ff431a61cf (diff)
chore: add a MainNavButton component
I also move the active state from the hamburger to this pseudo-button. It makes more sense that the button handles the icon shape.
Diffstat (limited to 'src/components/molecules/buttons/main-nav-button.test.tsx')
-rw-r--r--src/components/molecules/buttons/main-nav-button.test.tsx11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/components/molecules/buttons/main-nav-button.test.tsx b/src/components/molecules/buttons/main-nav-button.test.tsx
new file mode 100644
index 0000000..e757305
--- /dev/null
+++ b/src/components/molecules/buttons/main-nav-button.test.tsx
@@ -0,0 +1,11 @@
+import { render, screen } from '@test-utils';
+import MainNavButton from './main-nav-button';
+
+describe('MainNavButton', () => {
+ it('renders a checkbox', () => {
+ render(<MainNavButton isActive={false} setIsActive={() => null} />);
+ expect(
+ screen.getByRole('checkbox', { name: 'Open menu' })
+ ).toBeInTheDocument();
+ });
+});