Skip to content

Commit

Permalink
feat(CookieConsent): change name of the modal root class name property
Browse files Browse the repository at this point in the history
  • Loading branch information
danonechik94 committed Oct 22, 2024
1 parent f94ac69 commit 86ac7c5
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/components/CookieConsent/CookieConsent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export const CookieConsent = ({
<ConsentPopup
{...popupProps}
className={b()}
rootClassName={b('root')}
step={manageCookies ? ConsentPopupStep.Manage : ConsentPopupStep.Main}
onAction={onConsentPopupAction}
onClose={onClose}
Expand Down
1 change: 1 addition & 0 deletions src/components/CookieConsent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const Analytics = () => {
consentManager={consentManager}
cookieList={cookieList}
onConsentPopupClose={props.onClose}
modalClassName={'unique-class-name-for-adblockers'}
/>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ ConsentPopup.args = {
consentMode: ConsentMode.Manage,
policyLink: 'https://google.com',
cookieList,
modalClassName: 'unique-class-name-for-adblockers',
} as DefaultTemplateProps;

export const ManageCookies = DefaultTemplate.bind({});
Expand All @@ -80,6 +81,7 @@ ManageCookies.args = {
manageCookies: true,
policyLink: 'https://google.com',
cookieList,
modalClassName: 'unique-class-name-for-adblockers',
} as DefaultTemplateProps;

export const ConsentNotification = DefaultTemplate.bind({});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export const ConsentPopup = ({
policyLink,
onAction,
className,
rootClassName,
modalClassName,
policyLinkText = i18n('label_policy_extended'),
text,
manageLabelText = i18n('manage_label_text_extended'),
Expand Down Expand Up @@ -157,7 +157,7 @@ export const ConsentPopup = ({
open
disableOutsideClick
disableEscapeKeyDown
className={rootClassName}
className={modalClassName}
contentClassName={b('modal-content', {step: currentStep, mobile})}
onClose={onClose}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export type ConsentPopupProps = ConsentPopupData &
CookieConsentBaseProps & {
/* Active step */
step?: `${ConsentPopupStep}`;
rootClassName?: string;
/* Class for the root Modal node */
modalClassName?: string;
};

export interface HeaderProps {
Expand Down

0 comments on commit 86ac7c5

Please sign in to comment.