Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
},
"dependencies": {
"@tanstack/react-query": "^5.64.2",
"classnames": "^2.5.1",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
Expand Down Expand Up @@ -53,6 +54,7 @@
"lint-staged": "^15.4.1",
"prettier": "^3.4.2",
"sass": "^1.83.4",
"sass-loader": "^16.0.4",
"storybook": "^8.5.0",
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2",
Expand Down
Binary file added public/fonts/woff/Pretendard-Black.woff
Binary file not shown.
Binary file added public/fonts/woff/Pretendard-Bold.woff
Binary file not shown.
Binary file added public/fonts/woff/Pretendard-ExtraBold.woff
Binary file not shown.
Binary file added public/fonts/woff/Pretendard-ExtraLight.woff
Binary file not shown.
Binary file added public/fonts/woff/Pretendard-Light.woff
Binary file not shown.
Binary file added public/fonts/woff/Pretendard-Medium.woff
Binary file not shown.
Binary file added public/fonts/woff/Pretendard-Regular.woff
Binary file not shown.
Binary file added public/fonts/woff/Pretendard-SemiBold.woff
Binary file not shown.
Binary file added public/fonts/woff/Pretendard-Thin.woff
Binary file not shown.
Binary file added public/fonts/woff2/Pretendard-Black.woff2
Binary file not shown.
Binary file added public/fonts/woff2/Pretendard-Bold.woff2
Binary file not shown.
Binary file added public/fonts/woff2/Pretendard-ExtraBold.woff2
Binary file not shown.
Binary file not shown.
Binary file added public/fonts/woff2/Pretendard-Light.woff2
Binary file not shown.
Binary file added public/fonts/woff2/Pretendard-Medium.woff2
Binary file not shown.
Binary file added public/fonts/woff2/Pretendard-Regular.woff2
Binary file not shown.
Binary file added public/fonts/woff2/Pretendard-SemiBold.woff2
Binary file not shown.
Binary file added public/fonts/woff2/Pretendard-Thin.woff2
Binary file not shown.
1 change: 0 additions & 1 deletion public/vite.svg

This file was deleted.

4 changes: 3 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import Button from "@/components/Button";

const App = () => {
return <div>App</div>;
return <Button />;
};

export default App;
9 changes: 9 additions & 0 deletions src/components/Button.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@use "@/styles/mixins" as *;

.ButtonTest {
@include titleLg;
padding: 12px 16px;
border-radius: 8px;
background-color: var(--color-bg-error);
color: #fff;
}
9 changes: 9 additions & 0 deletions src/components/Button.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import classNames from "classnames";

import styles from "@/components/Button.module.scss";

const Button = () => {
return <button className={classNames(styles.ButtonTest)}>Button</button>;
};

export default Button;
2 changes: 2 additions & 0 deletions src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import App from "@/App";

import ReactQueryClientProvider from "@/components/provider/ReactQueryClientProvider";

import "@/styles/reset.scss";

createRoot(document.getElementById("root")!).render(
<StrictMode>
<ReactQueryClientProvider>
Expand Down
49 changes: 49 additions & 0 deletions src/styles/_mixins.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
@mixin titleLg {
font-size: var(--font-size-xl);
font-weight: var(--font-weight-bold);
}

@mixin titleMd {
font-size: var(--font-size-lg);
font-weight: var(--font-weight-bold);
}

@mixin titleSm {
font-size: var(--font-size-md);
font-weight: var(--font-weight-bold);
}

@mixin bodyLg {
font-size: var(--font-size-default);
font-weight: var(--font-weight-medium);
}

@mixin bodyMd {
font-size: var(--font-size-sm);
font-weight: var(--font-weight-medium);
}

@mixin bodySm {
font-size: var(--font-size-xs);
font-weight: var(--font-weight-medium);
}

@mixin bodyXsm {
font-size: var(--font-size-xxs);
font-weight: var(--font-weight-medium);
}

@mixin buttonMd {
font-size: var(--font-size-default);
font-weight: var(--font-weight-semi-bold);
}

@mixin buttonSm {
font-size: var(--font-size-default);
font-weight: var(--font-weight-medium);
}

@mixin buttonXs {
font-size: var(--font-size-xs);
font-weight: var(--font-weight-medium);
}
31 changes: 31 additions & 0 deletions src/styles/_variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
:root {
--font-weight-regular: 400;
--font-weight-medium: 500;
--font-weight-semi-bold: 600;
--font-weight-bold: 700;

--font-size-xl: 28px;
--font-size-lg: 24px;
--font-size-md: 22px;
--font-size-default: 16px;
--font-size-sm: 15px;
--font-size-xs: 14px;
--font-size-xxs: 13px;

--color-white: #fff;
--color-black: #000;
--color-text01: #363642;
--color-text02: #68696e;
--color-text03: #a6a6ad;
--color-text04: #e0e0e0;
--color-text-gradient: linear-gradient(#d444ba, #443fb6);
--color-gray100: #f8f8f8;
--color-gray200: #ebecf0;
--color-gray300: #e1e2e8;
--color-gray400: #00000026;
--color-gray500: #00000040;
--color-gray600: #363642;
--color-gray700: #161636;
--color-bg-gradient: linear-gradient(#ffffff, #443fb6);
--color-bg-error: #d45085;
}
134 changes: 134 additions & 0 deletions src/styles/reset.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}

/* HTML5 display-role reset */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
display: block;
}

body {
line-height: 1;
}

ol,
ul {
list-style: none;
}

blockquote,
q {
quotes: none;
}

blockquote::before,
blockquote::after,
q::before,
q::after {
content: "";
content: none;
}

table {
border-collapse: collapse;
border-spacing: 0;
}

* {
font-family: "Pretendard", sans-serif;
}
4 changes: 4 additions & 0 deletions src/types/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module "*.module.scss" {
const classes: { [className: string]: string };
export default classes;
}
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@/*": ["./src/*"]
},
"plugins": [{ "name": "typescript-plugin-css-modules" }],
"types": ["@testing-library/jest-dom"]
"types": ["@testing-library/jest-dom", "vite/client"]
},
"include": ["src"]
"include": ["src", "src/types"]
}
Loading