Skip to content

Commit cd61872

Browse files
committed
Replaced Osano toggle with CookieYes toggle
1 parent 9c186c4 commit cd61872

File tree

3 files changed

+16
-34
lines changed

3 files changed

+16
-34
lines changed

src/app/components/dialog/dialog.scss

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,18 @@
22

33
dialog,
44
[role="dialog"] {
5-
&:not([class *= 'osano']) {
6-
background-color: ui-color(white);
7-
border: 0;
8-
border-radius: 0.4rem;
9-
color: text-color(normal);
10-
display: block;
11-
grid-template-rows: auto auto 1fr;
12-
height: auto;
13-
margin: 0;
14-
overflow: hidden;
15-
padding: 0;
16-
position: relative;
17-
width: max-content;
18-
}
5+
background-color: ui-color(white);
6+
border: 0;
7+
border-radius: 0.4rem;
8+
color: text-color(normal);
9+
display: block;
10+
grid-template-rows: auto auto 1fr;
11+
height: auto;
12+
margin: 0;
13+
overflow: hidden;
14+
padding: 0;
15+
position: relative;
16+
width: max-content;
1917

2018
&.footer-dialog {
2119
align-self: flex-end;

src/app/layouts/default/footer/footer.js

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function Footer({
5353
<a href="/tos">Terms of Use</a>
5454
<a href="/license">Licensing</a>
5555
<a href="/privacy">Privacy Notice</a>
56-
<OsanoToggle />
56+
<CookieYesToggle />
5757
</ListOfLinks>
5858
</div>
5959
</div>
@@ -127,27 +127,11 @@ function Footer({
127127
);
128128
}
129129

130-
function OsanoToggle() {
131-
const osano = typeof window === 'undefined' ? undefined : window.Osano;
132-
const showOsanoDrawer = React.useCallback(
133-
(e) => {
134-
e.preventDefault();
135-
osano.cm.showDrawer('osano-cm-dom-info-dialog-open');
136-
},
137-
[osano]
138-
);
139-
140-
if (osano === undefined || osano.cm.mode === 'debug') {
141-
document.body.classList.remove('hide-osano');
142-
return null;
143-
}
144-
145-
document.body.classList.add('hide-osano');
130+
function CookieYesToggle() {
146131
return (
147132
<button
148133
type='button'
149-
className="small"
150-
onClick={showOsanoDrawer}
134+
className="cky-banner-element small"
151135
>
152136
Manage cookies
153137
</button>

src/styles/main.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ body {
1111
display: flex;
1212
flex-direction: column;
1313

14-
&.hide-osano .osano-cm-widget {
14+
.cky-btn-revisit-wrapper {
1515
display: none;
1616
}
1717
}

0 commit comments

Comments
 (0)