Commit 563d46d
prefers-reduced-motion added to top waves (#799)
<!--
Make sure you've read the CONTRIBUTING.md guidelines:
https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md
-->
enabled prefers-reduced-motion on the waves.tsx file for top banner.
<!-- ELLIPSIS_HIDDEN -->
----
> [!IMPORTANT]
> Adds `prefers-reduced-motion` support to `Waves` component in
`waves.tsx`, disabling wave rendering if motion reduction is preferred.
>
> - **Behavior**:
> - Adds `prefers-reduced-motion` detection in `Waves` component in
`waves.tsx`.
> - Uses `useState` and `useEffect` to track and respond to
`prefers-reduced-motion` media query.
> - If `prefers-reduced-motion` is true, the component returns `null`,
preventing wave rendering.
>
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=stack-auth%2Fstack-auth&utm_source=github&utm_medium=referral)<sup>
for 5db322e. You can
[customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>
<!-- ELLIPSIS_HIDDEN -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* The wave animation is now automatically disabled for users who have
enabled reduced motion preferences in their system settings, improving
accessibility.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>1 parent ffb720d commit 563d46d
1 file changed
Lines changed: 28 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
210 | 232 | | |
211 | 233 | | |
212 | 234 | | |
| |||
422 | 444 | | |
423 | 445 | | |
424 | 446 | | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
425 | 452 | | |
426 | 453 | | |
427 | 454 | | |
| |||
0 commit comments