From 2bd6c667ad8b8257d5ae628407740e378707768d Mon Sep 17 00:00:00 2001 From: rtrembecky Date: Wed, 3 Jan 2024 00:45:55 +0100 Subject: [PATCH 1/3] rewrite Banner styles using MUI --- .../PageLayout/Banner/Banner.module.scss | 20 ----------- .../PageLayout/Banner/Banner.module.scss.d.ts | 10 ------ src/components/PageLayout/Banner/Banner.tsx | 33 +++++++++++++++---- 3 files changed, 27 insertions(+), 36 deletions(-) delete mode 100644 src/components/PageLayout/Banner/Banner.module.scss delete mode 100644 src/components/PageLayout/Banner/Banner.module.scss.d.ts diff --git a/src/components/PageLayout/Banner/Banner.module.scss b/src/components/PageLayout/Banner/Banner.module.scss deleted file mode 100644 index 92ae186d..00000000 --- a/src/components/PageLayout/Banner/Banner.module.scss +++ /dev/null @@ -1,20 +0,0 @@ -.banner{ - width: 100vw; - background-color: black; - color: white; - border: none; - display: flex; - align-items: center; - z-index: 3; - margin-bottom: 0.5rem; - padding: 0.2rem 0; -} - - -.marqueeTextContainer { - white-space: nowrap; - padding: 0; - height: 100%; - display: flex; - align-items: center; -} \ No newline at end of file diff --git a/src/components/PageLayout/Banner/Banner.module.scss.d.ts b/src/components/PageLayout/Banner/Banner.module.scss.d.ts deleted file mode 100644 index 3a5d0238..00000000 --- a/src/components/PageLayout/Banner/Banner.module.scss.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export type Styles = { - banner: string - marqueeTextContainer: string -} - -export type ClassNames = keyof Styles - -declare const styles: Styles - -export default styles diff --git a/src/components/PageLayout/Banner/Banner.tsx b/src/components/PageLayout/Banner/Banner.tsx index 16464cfb..d03ee46c 100644 --- a/src/components/PageLayout/Banner/Banner.tsx +++ b/src/components/PageLayout/Banner/Banner.tsx @@ -1,20 +1,41 @@ -import {Typography} from '@mui/material' +import {Box, Typography} from '@mui/material' import {FC} from 'react' import {Marquee} from '@/components/Marquee/Marquee' import {BannerContainer} from '@/utils/BannerContainer' -import styles from './Banner.module.scss' - export const Banner: FC = () => { const {bannerText} = BannerContainer.useContainer() + return ( -
+ - + {bannerText || '\u00A0'} -
+ ) } From 867970a039e4f916cec6af46623f9fd39167b773 Mon Sep 17 00:00:00 2001 From: rtrembecky Date: Wed, 3 Jan 2024 00:46:16 +0100 Subject: [PATCH 2/3] fix horizontal scrollbar --- src/components/PageLayout/Banner/Banner.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/PageLayout/Banner/Banner.tsx b/src/components/PageLayout/Banner/Banner.tsx index d03ee46c..216d2e64 100644 --- a/src/components/PageLayout/Banner/Banner.tsx +++ b/src/components/PageLayout/Banner/Banner.tsx @@ -10,7 +10,6 @@ export const Banner: FC = () => { return ( Date: Wed, 3 Jan 2024 01:02:26 +0100 Subject: [PATCH 3/3] cleanup Banner styles --- src/components/PageLayout/Banner/Banner.tsx | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/components/PageLayout/Banner/Banner.tsx b/src/components/PageLayout/Banner/Banner.tsx index 216d2e64..1b5bba8f 100644 --- a/src/components/PageLayout/Banner/Banner.tsx +++ b/src/components/PageLayout/Banner/Banner.tsx @@ -12,26 +12,12 @@ export const Banner: FC = () => { sx={{ bgcolor: 'black', color: 'white', - border: 'none', - display: 'flex', - alignItems: 'center', zIndex: 3, - mb: '0.5rem', - p: '0.2rem 0', + py: '0.2rem', }} > - + {bannerText || '\u00A0'}