From 4cb671a0edd1e0f4a69c44143028b154b26b62b3 Mon Sep 17 00:00:00 2001 From: Jason Gill Date: Thu, 15 Aug 2024 12:48:05 -0600 Subject: [PATCH 1/4] update TCF banner button layout/split tcf styles --- .../fides-js/src/components/ConsentBanner.tsx | 5 +- .../src/components/ConsentButtons.tsx | 10 +- clients/fides-js/src/components/fides.css | 289 ++++++------------ .../src/components/tcf/TcfOverlay.tsx | 1 + .../fides-js/src/components/tcf/fides-tcf.css | 141 +++++++++ 5 files changed, 246 insertions(+), 200 deletions(-) create mode 100644 clients/fides-js/src/components/tcf/fides-tcf.css diff --git a/clients/fides-js/src/components/ConsentBanner.tsx b/clients/fides-js/src/components/ConsentBanner.tsx index 65821f88d3..dfdb9a9d54 100644 --- a/clients/fides-js/src/components/ConsentBanner.tsx +++ b/clients/fides-js/src/components/ConsentBanner.tsx @@ -3,7 +3,6 @@ import { useEffect } from "preact/hooks"; import { getConsentContext } from "../lib/consent-context"; import { GpcStatus } from "../lib/consent-types"; -import { useMediaQuery } from "../lib/hooks/useMediaQuery"; import { I18n, messageExists } from "../lib/i18n"; import CloseButton from "./CloseButton"; import ExperienceDescription from "./ExperienceDescription"; @@ -38,7 +37,6 @@ const ConsentBanner: FunctionComponent = ({ className, isEmbedded, }) => { - const isMobile = useMediaQuery("(max-width: 768px)"); const showGpcBadge = getConsentContext().globalPrivacyControl; useEffect(() => { @@ -122,9 +120,8 @@ const ConsentBanner: FunctionComponent = ({ {children} - {!isMobile && renderButtonGroup()} - {isMobile && renderButtonGroup()} + {renderButtonGroup()} diff --git a/clients/fides-js/src/components/ConsentButtons.tsx b/clients/fides-js/src/components/ConsentButtons.tsx index 3908e5cb9e..9d0774ebd3 100644 --- a/clients/fides-js/src/components/ConsentButtons.tsx +++ b/clients/fides-js/src/components/ConsentButtons.tsx @@ -55,6 +55,14 @@ export const ConsentButtons = ({ {!!renderFirstButton && renderFirstButton()} {!hideOptInOut && ( + {isTCF && !!onManagePreferencesClick && ( +