Skip to content

Commit 8b4ba03

Browse files
committed
Use class instead of inline style
1 parent 51dc269 commit 8b4ba03

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

src/app/index.module.css

+10
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,16 @@
3232
width: 400px;
3333
}
3434

35+
.staticLogo {
36+
width: 85%;
37+
height: auto;
38+
margin: 0 auto;
39+
display: block;
40+
position: relative;
41+
top: 50%;
42+
transform: translateY(-50%);
43+
}
44+
3545
.title {
3646
text-align: center;
3747
margin-bottom: calc(var(--mantine-spacing-xl));

src/components/logo.tsx

+2-7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import React from "react";
44
import Script from "next/script";
5+
import classes from "../app/index.module.css";
56

67
declare global {
78
interface Window {
@@ -40,13 +41,7 @@ export default class InteractiveLogo extends React.Component<LogoProps> {
4041
const staticLogo = document.createElement("IMG") as HTMLImageElement;
4142
staticLogo.src = "/logo.svg";
4243
staticLogo.alt = "Ruffle Logo";
43-
staticLogo.style.width = "85%";
44-
staticLogo.style.height = "auto";
45-
staticLogo.style.margin = "0 auto";
46-
staticLogo.style.display = "block";
47-
staticLogo.style.position = "relative";
48-
staticLogo.style.top = "50%";
49-
staticLogo.style.transform = "translateY(-50%)";
44+
staticLogo.className = classes.staticLogo;
5045
this.container.current.textContent = "";
5146
this.container.current.appendChild(staticLogo);
5247
}

0 commit comments

Comments
 (0)