diff --git a/.changelog/1361.trivial.md b/.changelog/1361.trivial.md new file mode 100644 index 000000000..78c9bd20d --- /dev/null +++ b/.changelog/1361.trivial.md @@ -0,0 +1 @@ +Improve footer styles after adding privacy link diff --git a/src/app/components/AnalyticsConsent/index.tsx b/src/app/components/AnalyticsConsent/index.tsx index a88cb7de5..7ad3d5699 100644 --- a/src/app/components/AnalyticsConsent/index.tsx +++ b/src/app/components/AnalyticsConsent/index.tsx @@ -86,6 +86,13 @@ export const AnalyticsConsentProvider = (props: { children: React.ReactNode }) = ) } +const StyledPrivacyButton = styled(Button)(() => ({ + padding: 0, + textAlign: 'left', + height: 'auto', + fontSize: 'inherit', +})) + export const ReopenAnalyticsConsentButton = () => { if (window.REACT_APP_ENABLE_OASIS_MATOMO_ANALYTICS !== 'true') return <> @@ -93,9 +100,9 @@ export const ReopenAnalyticsConsentButton = () => { const context = useContext(AnalyticsContext) if (context === null) throw new Error('must be used within AnalyticsContext') return ( - + ) } diff --git a/src/app/components/PageLayout/Footer.tsx b/src/app/components/PageLayout/Footer.tsx index dc62f9927..789c67363 100644 --- a/src/app/components/PageLayout/Footer.tsx +++ b/src/app/components/PageLayout/Footer.tsx @@ -31,9 +31,14 @@ const StyledBox = styled(Box)(({ theme }) => ({ const StyledLinksGroup = styled(Box)(({ theme }) => ({ display: 'flex', gap: theme.spacing(3), - borderLeft: `1px solid ${theme.palette.layout.main}`, - paddingLeft: theme.spacing(3), - marginLeft: theme.spacing(3), + paddingLeft: theme.spacing(2), +})) + +const StyledTypography = styled(Typography)(() => ({ + display: 'flex', + alignItems: 'center', + gap: 2, + flexWrap: 'wrap', })) interface FooterProps { @@ -46,15 +51,22 @@ export const Footer: FC = ({ scope, mobileSearchAction }) => { const { t } = useTranslation() const { isMobile, isTablet } = useScreenSize() const currentYear = useConstant(() => new Date().getFullYear()) + const hasMobileAction = isMobile && mobileSearchAction + const privacyPolicyLinkStyles = hasMobileAction ? { order: 1, flexBasis: '100%' } : {} return (