Skip to content

Commit

Permalink
feat: add style settings (#29)
Browse files Browse the repository at this point in the history
* feat: add fonts file

* feat: add global.css and apply to _app.tsx

* feat: add color contstant file

* feat: add media query constant file

* feat: add styles constant index file

* feat: update Test file
  • Loading branch information
kanghyun98 authored Aug 19, 2023
1 parent f5e411f commit 99247e7
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 1 deletion.
Binary file added src/assets/fonts/Nanum-BaReunHiPi.woff2
Binary file not shown.
Binary file added src/assets/fonts/SUIT-Variable.woff2
Binary file not shown.
7 changes: 6 additions & 1 deletion src/components/common/Test/Test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ interface Props {
text?: string;
}

const Test = ({ text }: Props) => <p className={styles.text}>{text}</p>;
const Test = ({ text }: Props) => (
<div>
<p className={styles.text}>{text}</p>
<p className={`${styles.text} hipi`}>{text}</p>
</div>
);

export default Test;
21 changes: 21 additions & 0 deletions src/constants/styles/color.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
export const COLORS = {
primary: {
red: '#EA4335',
yellow: '#FBBC04',
green: '#0F9D58',
blue: '#4285F4',
},
grayscale: {
white: '#FFFFFF',
gray1: '#F3F5F7',
gray2: '#ECEEF0',
gray3: '#E2E5E8',
gray4: '#D4D8DC',
gray5: '#B5B9BD',
gray6: '#8E9398',
gray7: '#505458',
gray8: '#3A3D40',
gray9: '#252729',
black: '#101112',
},
};
2 changes: 2 additions & 0 deletions src/constants/styles/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './color';
export * from './mediaQuery';
10 changes: 10 additions & 0 deletions src/constants/styles/mediaQuery.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const BREAK_POINTS = [800, 1280] as const;

/**
* media query 적용 기준 값
*/
export const MEDIA_QUERY = {
mobile: `screen and (max-width: ${BREAK_POINTS[0]}px)`,
tablet: `screen and (min-width: ${BREAK_POINTS[0]}px) and (max-width: ${BREAK_POINTS[1]}px)`,
pc: `screen and (min-width: ${BREAK_POINTS[1]}px )`,
} as const;
1 change: 1 addition & 0 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { AppProps } from 'next/app';
import './global.css';

export default function App({ Component, pageProps }: AppProps) {
return <Component {...pageProps} />;
Expand Down
26 changes: 26 additions & 0 deletions src/pages/global.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
@font-face {
font-family: 'SUIT Variable';
font-weight: 100 900;
src: url('../assets/fonts/SUIT-Variable.woff2') format('woff2-variations');
}

@font-face {
font-family: 'Nanum BaReunHiPi';
font-weight: 100 900;
src: url('../assets/fonts/Nanum-BaReunHiPi.woff2') format('woff2-variations');
}

*,
*:before,
*:after {
font-family: 'SUIT Variable';
box-sizing: border-box;
}

body {
margin: 0;
}

.hipi {
font-family: 'Nanum BaReunHiPi';
}

0 comments on commit 99247e7

Please sign in to comment.