From 86e2ac6c0afca471c811ed3066d3b470c297fc03 Mon Sep 17 00:00:00 2001 From: seaerchin <44049504+seaerchin@users.noreply.github.com> Date: Tue, 3 Oct 2023 11:30:34 +0800 Subject: [PATCH] fix(hero): update panel styles for hero section (#1543) * fix(herosidelayout): default to white bg * fix(herobody): style fixes * fix(hero): style fixes * fix(hero-image-only): change styling on small screens --------- Co-authored-by: seaerchin --- src/layouts/components/Homepage/HeroBody.tsx | 31 ++++++++------- .../components/homepage/_hero.scss | 4 ++ src/styles/isomer-template/theme/_colors.scss | 1 + src/styles/isomer-template/theme/_layout.scss | 9 +++++ .../HeroSection/HeroCenteredLayout.tsx | 2 +- .../homepage/HeroSection/HeroDropdown.tsx | 3 +- .../HeroSection/HeroImageOnlyLayout.tsx | 39 ++++++++++--------- .../homepage/HeroSection/HeroSection.tsx | 1 + .../homepage/HeroSection/HeroSideLayout.tsx | 9 +++-- 9 files changed, 59 insertions(+), 40 deletions(-) diff --git a/src/layouts/components/Homepage/HeroBody.tsx b/src/layouts/components/Homepage/HeroBody.tsx index 12bf8df62..fe8732b9b 100644 --- a/src/layouts/components/Homepage/HeroBody.tsx +++ b/src/layouts/components/Homepage/HeroBody.tsx @@ -203,7 +203,7 @@ const HeroSideSectionLayout = ({ title={title} subtitle={subtitle} /> - + Section size { @@ -218,11 +218,11 @@ const HeroSideSectionLayout = ({ > - Half (1/2) of banner + Wide - Third (1/3) of banner + Narrow @@ -253,24 +253,24 @@ const HeroSideSectionLayout = ({ Section background colour - - + + onIconButtonClick("black")} + {...getIconButtonProps("white")} + onClick={() => onIconButtonClick("white")} > - + - + onIconButtonClick("white")} + {...getIconButtonProps("black")} + onClick={() => onIconButtonClick("black")} > - + - + onIconButtonClick("gray")} @@ -313,7 +313,7 @@ const HeroLayoutForm = ({ }, [inView, showNewLayouts]) return ( - + {showFeatureTour && ( Layout Hero Interactions - + Content type ) : null} {/* Hero dropdown */} - {hero.dropdown ? ( + {hero.dropdown.title ? (
diff --git a/src/templates/homepage/HeroSection/HeroImageOnlyLayout.tsx b/src/templates/homepage/HeroSection/HeroImageOnlyLayout.tsx index d3c768854..0f805ec50 100644 --- a/src/templates/homepage/HeroSection/HeroImageOnlyLayout.tsx +++ b/src/templates/homepage/HeroSection/HeroImageOnlyLayout.tsx @@ -4,21 +4,26 @@ import { getClassNames } from "templates/utils/stylingUtils" import { EditorHeroDropdownSection } from "types/homepage" +import { HeroButton } from "./HeroButton" import { HeroDropdown } from "./HeroDropdown" interface HeroImageOnlyLayoutProps { dropdown?: EditorHeroDropdownSection["dropdown"] + button?: string dropdownIsActive: boolean toggleDropdown: () => void } export const HeroImageOnlyLayout = ({ dropdown, + button, dropdownIsActive, toggleDropdown, }: HeroImageOnlyLayoutProps) => { return (
-
+
- {dropdown && ( - + {dropdown?.title ? ( +
+ +
+ ) : ( + )}
diff --git a/src/templates/homepage/HeroSection/HeroSection.tsx b/src/templates/homepage/HeroSection/HeroSection.tsx index 5fbeaab82..68de39886 100644 --- a/src/templates/homepage/HeroSection/HeroSection.tsx +++ b/src/templates/homepage/HeroSection/HeroSection.tsx @@ -153,6 +153,7 @@ export const TemplateHeroSection = forwardRef< )} {variant === "image" && ( - {dropdown ? ( + {dropdown?.title ? (
- {dropdown ? ( + {dropdown?.title ? (