From ad891c3a8f82d89ffc048ffcca7cbf9c6953f185 Mon Sep 17 00:00:00 2001 From: seaerchin Date: Wed, 13 Sep 2023 17:58:32 +0800 Subject: [PATCH] feat(hero): add dropdown --- .../HeroSection/HeroCenteredLayout.tsx | 107 +---------- .../homepage/HeroSection/HeroDropdown.tsx | 100 ++++++++++ .../homepage/HeroSection/HeroSection.tsx | 14 +- .../homepage/HeroSection/HeroSideLayout.tsx | 173 +++++++++++------- 4 files changed, 221 insertions(+), 173 deletions(-) create mode 100644 src/templates/homepage/HeroSection/HeroDropdown.tsx diff --git a/src/templates/homepage/HeroSection/HeroCenteredLayout.tsx b/src/templates/homepage/HeroSection/HeroCenteredLayout.tsx index a132340a78..2d16c32598 100644 --- a/src/templates/homepage/HeroSection/HeroCenteredLayout.tsx +++ b/src/templates/homepage/HeroSection/HeroCenteredLayout.tsx @@ -1,16 +1,11 @@ -// NOTE: jsx-ally is disabled for this file as the output of this -// should match jekyll output as closely as possible. -// As jekyll outputs an tag like so, this behaviour is preserved here. -/* eslint-disable jsx-a11y/anchor-is-valid */ - -/* eslint - react/no-array-index-key: 0 - */ - import editorStyles from "styles/isomer-cms/pages/Editor.module.scss" import { getClassNames } from "templates/utils/stylingUtils" +import { EditorHeroDropdownSection } from "types/homepage" + +import { HeroDropdown } from "./HeroDropdown" + interface HeroButtonProps { button?: string } @@ -32,105 +27,13 @@ const HeroButton = ({ button }: HeroButtonProps) => ( ) -interface HeroDropdownElemProps { - title: string -} -const HeroDropdownElem = ({ title }: HeroDropdownElemProps) => ( -
-
{title}
-
-) - -interface HeroDropdownProps { - title: string - isActive?: boolean - options: { title: string }[] - toggleDropdown: () => void -} -const HeroDropdown = ({ - title, - options, - isActive, - toggleDropdown, -}: HeroDropdownProps) => ( -
-
- - - -

{title}

-
-
- -