Skip to content

Commit 77a52cb

Browse files
committed
feat: module scss 적용 설정
1 parent 7ed6a88 commit 77a52cb

14 files changed

+156
-3
lines changed

.pnp.cjs

Lines changed: 61 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
24.7 KB
Binary file not shown.
308 KB
Binary file not shown.
61.9 KB
Binary file not shown.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
},
1717
"dependencies": {
1818
"@tanstack/react-query": "^5.64.2",
19+
"classnames": "^2.5.1",
1920
"react": "^18.3.1",
2021
"react-dom": "^18.3.1"
2122
},
@@ -53,6 +54,7 @@
5354
"lint-staged": "^15.4.1",
5455
"prettier": "^3.4.2",
5556
"sass": "^1.83.4",
57+
"sass-loader": "^16.0.4",
5658
"storybook": "^8.5.0",
5759
"ts-jest": "^29.2.5",
5860
"ts-node": "^10.9.2",

src/App.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
import Button from "@/components/Button";
2+
13
const App = () => {
2-
return <div>App</div>;
4+
return <Button />;
35
};
46

57
export default App;

src/components/Button.module.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
@use "@/styles/_mixins" as *;
2+
@use "@/styles/_variables" as *;
3+
4+
.ButtonTest {
5+
@include titleLg;
6+
padding: 12px 16px;
7+
border-radius: 8px;
8+
background-color: $color-bg-error;
9+
color: #fff;
10+
}

src/components/Button.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import classNames from "classnames";
2+
3+
import styles from "@/components/Button.module.scss";
4+
5+
const Button = () => {
6+
return <button className={classNames(styles.ButtonTest)}>Button</button>;
7+
};
8+
9+
export default Button;

src/styles/_mixins.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use "@/styles/_variables.scss" as *;
2+
13
@mixin titleLg {
24
font-size: $font-size-xl;
35
font-weight: $font-weight-bold;

src/styles/reset.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,7 @@ table {
128128
border-collapse: collapse;
129129
border-spacing: 0;
130130
}
131+
132+
* {
133+
font-family: "Pretendard", sans-serif;
134+
}

0 commit comments

Comments
 (0)