Skip to content

Commit 25f2a3c

Browse files
authored
Merge pull request #8 from gitgitWi/nextjs/v1
Title 컴포넌트 추가, SCSS 적용, 첫 포스트
2 parents 4b799e7 + 32e7699 commit 25f2a3c

File tree

19 files changed

+199
-33
lines changed

19 files changed

+199
-33
lines changed

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"editor.tabSize": 2,
3+
"prettier.printWidth": 90,
4+
"prettier.endOfLine": "lf"
5+
}

components/atoms/Texts.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
interface TextsProps {
2+
texts: string;
3+
className: string;
4+
}
5+
6+
export function Texts({ texts, className }: TextsProps) {
7+
return <span className={className}>{texts}</span>;
8+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.headText {
2+
font-size: 2rem;
3+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { Texts } from "../atoms/Texts";
2+
import { CENTER } from "../../styles/GlobalClassNames";
3+
import style from "./TitleTexts.module.scss";
4+
5+
interface TitleTextsProps {
6+
titleText: string;
7+
}
8+
9+
export function TitleTexts({ titleText }: TitleTextsProps) {
10+
return <Texts texts={titleText} className={[style.headText, CENTER].join(" ")} />;
11+
}

components/molecules/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { TitleTexts } from "./TitleTexts";

next-env.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/types/global" />
33
/// <reference types="next/image-types/global" />
4+
5+
// NOTE: This file should not be edited
6+
// see https://nextjs.org/docs/basic-features/typescript for more information.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"@next/mdx": "^11.1.0",
1616
"next": "11.1.0",
1717
"react": "17.0.2",
18-
"react-dom": "17.0.2"
18+
"react-dom": "17.0.2",
19+
"sass": "^1.38.0"
1920
},
2021
"devDependencies": {
2122
"@types/node": "^16.6.1",

pages/_app.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

pages/_app.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { AppProps } from "next/app";
2+
import "../styles/globals.scss";
3+
4+
export default function MyApp({ Component, pageProps }: AppProps) {
5+
return <Component {...pageProps} />;
6+
}

pages/articles/hello.mdx

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)