From 19c5d0637581e42ead5e326a4fd41bcc8067d5b5 Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Mon, 5 Oct 2020 13:05:18 +0100 Subject: Update headerbar to be more responsive and take custom text --- src/components/HeaderBar/index.tsx | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'src/components') diff --git a/src/components/HeaderBar/index.tsx b/src/components/HeaderBar/index.tsx index 6289dfc..c3d46fc 100644 --- a/src/components/HeaderBar/index.tsx +++ b/src/components/HeaderBar/index.tsx @@ -5,6 +5,10 @@ import SVG from "react-inlinesvg"; import header1 from "./header_1.svg"; import header2 from "./header_2.svg"; +interface HeaderBarProps { + title?: string +} + const headerImageStyles = css` z-index: -1; top: 0; @@ -13,22 +17,22 @@ width: 100%; transition: height 1s; @media (max-width: 770px) { - height: 180px; -} - -@media (max-width: 580px) { height: 140px; } `; -function HeaderBar() { +function HeaderBar({ title }: HeaderBarProps) { + if (!title) { + title = "Python Discord Forms"; + }; + return

- Python Discord Forms + {title}

} -- cgit v1.2.3