Skip to content

Commit

Permalink
consent overlay - rearrange buttons and update spacing (#4391)
Browse files Browse the repository at this point in the history
Co-authored-by: Allison King <[email protected]>
  • Loading branch information
Kelsey-Ethyca and allisonking authored Nov 7, 2023
1 parent bce0664 commit 7e23d55
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 63 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ The types of changes are:
- "is_service_specific" default updated when building TC strings on the backend [#4377](https://github.com/ethyca/fides/pull/4377)
- Redact cli, database, and redis configuration information from GET api/v1/config API request responses. [#4379](https://github.com/ethyca/fides/pull/4379)

### Fixed
### Fixed
- Fix button arrangment and spacing for TCF and non-TCF consent overlay banner and modal [#4391](https://github.com/ethyca/fides/pull/4391)
- Replaced h1 element with div to use exisitng fides styles in consent modal [#4399](https://github.com/ethyca/fides/pull/4399)

## [2.23.2](https://github.com/ethyca/fides/compare/2.23.1...2.23.2)
Expand Down
4 changes: 3 additions & 1 deletion clients/fides-js/src/components/ConsentBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ interface BannerProps {
children?: ComponentChildren;
onVendorPageClick?: () => void;
renderButtonGroup: (props: ButtonGroupProps) => VNode;
className?: string;
}

const ConsentBanner: FunctionComponent<BannerProps> = ({
Expand All @@ -32,6 +33,7 @@ const ConsentBanner: FunctionComponent<BannerProps> = ({
children,
onVendorPageClick,
renderButtonGroup,
className,
}) => {
const [isMobile, setIsMobile] = useState(window.innerWidth < 768);

Expand Down Expand Up @@ -62,7 +64,7 @@ const ConsentBanner: FunctionComponent<BannerProps> = ({
className={`fides-banner
fides-banner-bottom
${bannerIsOpen ? "" : "fides-banner-hidden"}
${window.Fides.options.tcfEnabled ? "fides-tcf-banner-container" : ""}`}
${className}`}
>
<div id="fides-banner">
<div id="fides-banner-inner">
Expand Down
8 changes: 4 additions & 4 deletions clients/fides-js/src/components/ConsentButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ export const ConsentButtons = ({
{firstButton || null}
<Button
buttonType={ButtonType.PRIMARY}
label={experienceConfig.accept_button_label}
onClick={onAcceptAll}
label={experienceConfig.reject_button_label}
onClick={onRejectAll}
/>
<Button
buttonType={ButtonType.PRIMARY}
label={experienceConfig.reject_button_label}
onClick={onRejectAll}
label={experienceConfig.accept_button_label}
onClick={onAcceptAll}
/>
</div>
{children}
Expand Down
Loading

0 comments on commit 7e23d55

Please sign in to comment.