Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(pie-cookie-banner): DSW-2210 add entrance animation variants #1579

Merged
merged 9 commits into from
Jul 23, 2024
5 changes: 5 additions & 0 deletions .changeset/eighty-candles-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@justeattakeaway/pie-cookie-banner": minor
---

[Added] - An entrance animation to the cookie banner that makes it slide into the viewport from below.
10 changes: 10 additions & 0 deletions packages/components/pie-cookie-banner/src/cookie-banner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ $breakpoint-wide: 700px;
&[isCookieBannerHidden] {
display: none;
}

@media (prefers-reduced-motion: no-preference) {
@keyframes animate-enter {
0% { transform: translate3d(0, 75%, 0); }

100% { transform: translate3d(0, 0, 0); }
}

animation: 0.5s animate-enter ease-out;
}
}

.c-cookieBanner-title,
Expand Down
Loading