From 15c26adff1c8948a118f7d48ba01725f11089b17 Mon Sep 17 00:00:00 2001 From: Luqmaan Essop Date: Mon, 15 Apr 2024 14:38:56 +0000 Subject: [PATCH 01/17] style: adjustments on figcaption and unordered list --- packages/ui/src/components/Organisms/Footer.tsx | 12 ++++++------ .../components/Organisms/PageContent/BlockMarkup.tsx | 2 +- .../components/Organisms/PageContent/BlockMedia.tsx | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/ui/src/components/Organisms/Footer.tsx b/packages/ui/src/components/Organisms/Footer.tsx index 059b57695..0264b134f 100644 --- a/packages/ui/src/components/Organisms/Footer.tsx +++ b/packages/ui/src/components/Organisms/Footer.tsx @@ -73,7 +73,7 @@ export function Footer() {
{item.title} @@ -174,7 +174,7 @@ export function Footer() { {child.title} diff --git a/packages/ui/src/components/Organisms/PageContent/BlockMarkup.tsx b/packages/ui/src/components/Organisms/PageContent/BlockMarkup.tsx index 7ff050f95..54f29a9fb 100644 --- a/packages/ui/src/components/Organisms/PageContent/BlockMarkup.tsx +++ b/packages/ui/src/components/Organisms/PageContent/BlockMarkup.tsx @@ -43,7 +43,7 @@ export function BlockMarkup(props: BlockMarkupFragment) { className={clsx(className, { 'list-none relative': unordered })} > {unordered ? ( - + ) : null} {children} diff --git a/packages/ui/src/components/Organisms/PageContent/BlockMedia.tsx b/packages/ui/src/components/Organisms/PageContent/BlockMedia.tsx index a2d9ec34d..4907c2486 100644 --- a/packages/ui/src/components/Organisms/PageContent/BlockMedia.tsx +++ b/packages/ui/src/components/Organisms/PageContent/BlockMedia.tsx @@ -13,7 +13,7 @@ export function BlockMedia(props: BlockMediaFragment) {
{props.caption ? ( -
+
) : null} @@ -27,7 +27,7 @@ function Media(props: Required['media']) { case 'MediaImage': return ( From bb8e37de241e05bfab955b88b0286354a538373c Mon Sep 17 00:00:00 2001 From: Luqmaan Essop Date: Mon, 15 Apr 2024 14:43:42 +0000 Subject: [PATCH 02/17] chore: prettier --- packages/ui/src/components/Organisms/Footer.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/ui/src/components/Organisms/Footer.tsx b/packages/ui/src/components/Organisms/Footer.tsx index 0264b134f..b318df60b 100644 --- a/packages/ui/src/components/Organisms/Footer.tsx +++ b/packages/ui/src/components/Organisms/Footer.tsx @@ -118,10 +118,7 @@ export function Footer() { />
- + Date: Mon, 15 Apr 2024 14:38:56 +0000 Subject: [PATCH 03/17] style: adjustments on figcaption and unordered list --- packages/ui/src/components/Organisms/Footer.tsx | 12 ++++++------ .../components/Organisms/PageContent/BlockMarkup.tsx | 2 +- .../components/Organisms/PageContent/BlockMedia.tsx | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/ui/src/components/Organisms/Footer.tsx b/packages/ui/src/components/Organisms/Footer.tsx index 059b57695..0264b134f 100644 --- a/packages/ui/src/components/Organisms/Footer.tsx +++ b/packages/ui/src/components/Organisms/Footer.tsx @@ -73,7 +73,7 @@ export function Footer() {
{item.title} @@ -174,7 +174,7 @@ export function Footer() { {child.title} diff --git a/packages/ui/src/components/Organisms/PageContent/BlockMarkup.tsx b/packages/ui/src/components/Organisms/PageContent/BlockMarkup.tsx index 7ff050f95..54f29a9fb 100644 --- a/packages/ui/src/components/Organisms/PageContent/BlockMarkup.tsx +++ b/packages/ui/src/components/Organisms/PageContent/BlockMarkup.tsx @@ -43,7 +43,7 @@ export function BlockMarkup(props: BlockMarkupFragment) { className={clsx(className, { 'list-none relative': unordered })} > {unordered ? ( - + ) : null} {children} diff --git a/packages/ui/src/components/Organisms/PageContent/BlockMedia.tsx b/packages/ui/src/components/Organisms/PageContent/BlockMedia.tsx index a2d9ec34d..4907c2486 100644 --- a/packages/ui/src/components/Organisms/PageContent/BlockMedia.tsx +++ b/packages/ui/src/components/Organisms/PageContent/BlockMedia.tsx @@ -13,7 +13,7 @@ export function BlockMedia(props: BlockMediaFragment) {
{props.caption ? ( -
+
) : null} @@ -27,7 +27,7 @@ function Media(props: Required['media']) { case 'MediaImage': return ( From 256b7d9611553260183726d060b7ca3daf749a83 Mon Sep 17 00:00:00 2001 From: Luqmaan Essop Date: Mon, 15 Apr 2024 14:43:42 +0000 Subject: [PATCH 04/17] chore: prettier --- packages/ui/src/components/Organisms/Footer.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/ui/src/components/Organisms/Footer.tsx b/packages/ui/src/components/Organisms/Footer.tsx index 0264b134f..b318df60b 100644 --- a/packages/ui/src/components/Organisms/Footer.tsx +++ b/packages/ui/src/components/Organisms/Footer.tsx @@ -118,10 +118,7 @@ export function Footer() { />
- + Date: Mon, 15 Apr 2024 20:07:24 +0200 Subject: [PATCH 05/17] feat(SLB-322): adapt hero section when no image is passed --- .../ui/src/components/Organisms/PageHero.tsx | 105 ++++++++++++------ .../ui/src/components/Routes/Page.stories.tsx | 3 + 2 files changed, 75 insertions(+), 33 deletions(-) diff --git a/packages/ui/src/components/Organisms/PageHero.tsx b/packages/ui/src/components/Organisms/PageHero.tsx index be2e4cc8a..e8de4699e 100644 --- a/packages/ui/src/components/Organisms/PageHero.tsx +++ b/packages/ui/src/components/Organisms/PageHero.tsx @@ -4,7 +4,13 @@ import React from 'react'; import { BlockForm } from './PageContent/BlockForm'; export function PageHero(props: NonNullable) { - return props.formUrl ? : ; + return props.formUrl ? ( + + ) : props.image ? ( + + ) : ( + + ); } function DefaultHero(props: NonNullable) { @@ -19,33 +25,9 @@ function DefaultHero(props: NonNullable) { data-test-id={'hero-image'} /> ) : null} -