Skip to content

Commit 3a87b1d

Browse files
committed
Updated styling
- added clsx to make it easier to combine css modules and Tailwind classes - updated styling to use Tailwind inline - removed @babel/eslint-parser, not needed
1 parent b8b6eab commit 3a87b1d

File tree

5 files changed

+22
-19
lines changed

5 files changed

+22
-19
lines changed

.eslintrc.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"Atomics": "readonly",
1111
"SharedArrayBuffer": "readonly"
1212
},
13-
// "parser": "@babel/eslint-parser",
1413
"parserOptions": {
1514
"ecmaFeatures": {
1615
"jsx": true

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"author": "",
1717
"license": "ISC",
1818
"dependencies": {
19+
"clsx": "^1.1.1",
1920
"core-js": "3",
2021
"regenerator-runtime": "^0.13.7",
2122
"solid-js": "^0.23.10"

pnpm-lock.yaml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/App/App.module.css

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
.header {
22
background-color: #282c34;
33
color: whitesmoke;
4-
min-height: 100vh;
5-
display: flex;
6-
flex-direction: column;
7-
align-items: center;
8-
justify-content: center;
94
font-size: calc(10px + 2vmin);
10-
text-align: center;
115
}
126

137
.link {
@@ -21,8 +15,10 @@
2115

2216
.logo {
2317
height: 40vmin;
24-
pointer-events: none;
25-
margin-bottom: 1.0rem;
18+
}
19+
20+
.wordmark {
21+
height: 7vmin;
2622
}
2723

2824
@media (prefers-reduced-motion: no-preference) {
@@ -31,16 +27,9 @@
3127
}
3228
}
3329

34-
.wordmark {
35-
height: 5vmin;
36-
/* margin: 1rem 0; */
37-
}
38-
3930
:global code {
4031
background: #FFF3;
4132
@apply rounded-md p-2;
42-
/* padding: 4px 8px; */
43-
/* border-radius: 4px; */
4433
}
4534

4635
@keyframes spin {

src/components/App/App.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Component, createSignal, onCleanup } from 'solid-js';
2+
import clsx from 'clsx';
23

34
import logo from 'assets/logo.svg';
45
import wordmark from 'assets/wordmark.svg';
@@ -10,15 +11,20 @@ const App: Component = () => {
1011
onCleanup(() => clearInterval(timer));
1112
return (
1213
<>
13-
<header class={styles.header}>
14-
<img src={logo} class={styles.logo} alt="logo" />
14+
<header
15+
class={clsx(
16+
styles.header,
17+
'min-h-screen flex flex-col justify-center items-center text-center'
18+
)}
19+
>
20+
<img src={logo} class={clsx(styles.logo, 'pointer-events-none mb-4')} alt="logo" />
1521
<a
1622
class={styles.link}
1723
href="https://github.com/ryansolid/solid#documentation"
1824
target="_blank"
1925
rel="noopener noreferrer"
2026
>
21-
<img src={wordmark} class={`${styles.wordmark} my-4`} alt="wordmark" />
27+
<img src={wordmark} class={clsx(styles.wordmark, 'my-4')} alt="wordmark" />
2228
</a>
2329
<p class="my-4">
2430
Edit <code>src/App.tsx</code> and save to reload.

0 commit comments

Comments
 (0)