From e7788f8d2cc90cc8b9b3617442ef6024b9628619 Mon Sep 17 00:00:00 2001 From: Nick Pang Date: Mon, 9 Sep 2024 14:57:08 +1000 Subject: [PATCH] Move footer into Card component. Updated styles as needed --- src/components/footer/Footer.stories.tsx | 18 +++++++++++ src/components/footer/Footer.tsx | 27 +++++++++------- src/components/page/Page.tsx | 14 +++++++++ src/pages/index.tsx | 40 +----------------------- 4 files changed, 49 insertions(+), 50 deletions(-) diff --git a/src/components/footer/Footer.stories.tsx b/src/components/footer/Footer.stories.tsx index 3161db80..2855390e 100644 --- a/src/components/footer/Footer.stories.tsx +++ b/src/components/footer/Footer.stories.tsx @@ -14,3 +14,21 @@ Default.args = { acknowledgement: "[Acknowledgement of Country](https://www.indigenous.gov.au/contact-us/welcome_acknowledgement-country)", }; + +export const TEQSAAndCRICOS = Template.bind({}); +TEQSAAndCRICOS.args = { + notice: + "TEQSA Provider ID [PRV12079](https://www.teqsa.gov.au/national-register/provider/queensland-university-technology) Australian University | CRICOS No. 00213J", + acknowledgement: + "[Acknowledgement of Country](https://www.indigenous.gov.au/contact-us/welcome_acknowledgement-country)", +}; + +export const TEQSAAndCRICOSWithShortNotice = Template.bind({}); +TEQSAAndCRICOSWithShortNotice.args = { + notice: + "TEQSA Provider ID [PRV12079](https://www.teqsa.gov.au/national-register/provider/queensland-university-technology) Australian University | CRICOS No. 00213J", + shortNotice: + "TEQSA [PRV12079](https://www.teqsa.gov.au/national-register/provider/queensland-university-technology) | CRICOS 00213J", + acknowledgement: + "[Acknowledgement of Country](https://www.indigenous.gov.au/contact-us/welcome_acknowledgement-country)", +}; diff --git a/src/components/footer/Footer.tsx b/src/components/footer/Footer.tsx index 812f4d98..125e5df0 100644 --- a/src/components/footer/Footer.tsx +++ b/src/components/footer/Footer.tsx @@ -1,24 +1,29 @@ -import { FunctionComponent, PropsWithChildren } from "react"; -import { Stack } from "@chakra-ui/react"; +import { Fragment, FunctionComponent, PropsWithChildren } from "react"; +import { Show, Stack } from "@chakra-ui/react"; import { Markdown } from "../markdown"; export interface FooterProps { - acknowledgement?: string; - notice?: string; + acknowledgement: string; + notice: string; + shortNotice?: string; } export const Footer: FunctionComponent> = ( props ) => { - const { acknowledgement, notice, children } = props; + const { acknowledgement, notice, shortNotice, children } = props; return ( - - {acknowledgement && } + + {children} - {notice && } + + + + + + + + ); }; diff --git a/src/components/page/Page.tsx b/src/components/page/Page.tsx index c064cc76..5cf9ce90 100644 --- a/src/components/page/Page.tsx +++ b/src/components/page/Page.tsx @@ -16,6 +16,7 @@ import { useMultiStyleConfig, } from "@chakra-ui/react"; import { Header, HeaderProps } from "../header"; +import { Footer } from "../footer"; export interface PageProps { header: HeaderProps; @@ -78,6 +79,19 @@ export const Page: FunctionComponent> = ( + +