Skip to content

Commit 0ecaac4

Browse files
committed
fix(dev-frontend): 🐛 replace style-breaking emoition with css module
1 parent 328ef8d commit 0ecaac4

File tree

4 files changed

+37
-343
lines changed

4 files changed

+37
-343
lines changed

packages/dev-frontend/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"private": true,
55
"type": "module",
66
"dependencies": {
7-
"@emotion/react": "^11.14.0",
87
"@ethersproject/abi": "5.7.0",
98
"@ethersproject/experimental": "5.7.0",
109
"@fortawesome/fontawesome-svg-core": "1.2.36",
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
@keyframes spin {
2+
from {
3+
rotate: 0deg;
4+
}
5+
6+
to {
7+
rotate: 360deg;
8+
}
9+
}
10+
11+
.spinAnimation {
12+
animation: spin 2s infinite linear;
13+
}
14+
15+
@keyframes scale {
16+
0% {
17+
scale: 1;
18+
}
19+
20+
50% {
21+
scale: 1.1;
22+
}
23+
24+
100% {
25+
scale: 1;
26+
}
27+
}
28+
.scaleAnimation {
29+
animation: scale 1s infinite ease;
30+
}

packages/dev-frontend/src/components/NewFeatureDisclaimer.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
import { Icon } from "./Icon";
33
import { Tooltip } from "./Tooltip";
44
import { Text } from "theme-ui";
5-
import { keyframes } from "@emotion/react";
6-
7-
const spin = keyframes({ from: { rotate: "0deg" }, to: { rotate: "360deg" } });
8-
const scale = keyframes({ "0%": { scale: "1" }, "50%": { scale: "1.1" }, "100%": { scale: "1" } });
5+
import styles from "./NewFeatureDisclaimer.module.css";
96

107
export const NewFeatureDisclaimer: React.FC = () => {
118
return (
@@ -22,17 +19,17 @@ export const NewFeatureDisclaimer: React.FC = () => {
2219
role="presentation"
2320
sx={{
2421
display: "grid",
25-
placeContent: "center",
26-
animation: `${spin} 2s infinite linear`
22+
placeContent: "center"
2723
}}
24+
className={styles.spinAnimation}
2825
>
2926
<span
3027
role="presentation"
3128
sx={{
3229
display: "grid",
33-
placeContent: "center",
34-
animation: `${scale} 1s infinite ease`
30+
placeContent: "center"
3531
}}
32+
className={styles.scaleAnimation}
3633
>
3734
<Icon name="certificate" size="lg" color="#ff755f" />
3835
</span>

0 commit comments

Comments
 (0)