Skip to content

Commit a7b9fb0

Browse files
committed
style(client): introduce css module
1 parent c785da8 commit a7b9fb0

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed
File renamed without changes.

client/src/App.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useState } from 'react';
22
import reactLogo from './assets/react.svg';
33
import viteLogo from '/vite.svg';
4-
import './App.css';
4+
import styles from './App.module.css';
55

66
function App() {
77
const [count, setCount] = useState(0);
@@ -10,22 +10,22 @@ function App() {
1010
<>
1111
<div>
1212
<a href='https://vite.dev' target='_blank'>
13-
<img src={viteLogo} className='logo' alt='Vite logo' />
13+
<img src={viteLogo} className={styles.logo} alt='Vite logo' />
1414
</a>
1515
<a href='https://react.dev' target='_blank'>
16-
<img src={reactLogo} className='logo react' alt='React logo' />
16+
<img src={reactLogo} className={styles.logo} alt='React logo' />
1717
</a>
1818
</div>
1919
<h1>Vite + React</h1>
20-
<div className='card'>
20+
<div className={styles.card}>
2121
<button onClick={() => setCount((count) => count + 1)}>
2222
count is {count}
2323
</button>
2424
<p>
2525
Edit <code>src/App.tsx</code> and save to test HMR
2626
</p>
2727
</div>
28-
<p className='read-the-docs'>
28+
<p className={styles.readTheDocs}>
2929
Click on the Vite and React logos to learn more
3030
</p>
3131
</>

client/src/index.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
#root {
2+
max-width: 1280px;
3+
margin: 0 auto;
4+
padding: 2rem;
5+
text-align: center;
6+
}
7+
18
:root {
29
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
310
line-height: 1.5;

0 commit comments

Comments
 (0)