From 20c71f0664d61b7ea6eecce59f570a56d451acd2 Mon Sep 17 00:00:00 2001 From: eeseung Date: Mon, 30 Oct 2023 23:46:47 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20#4=20-=20Pretendard=20=ED=8F=B0?= =?UTF-8?q?=ED=8A=B8=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/globals.css | 5 +++++ src/app/layout.tsx | 6 +----- tailwind.config.ts | 4 ++++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/app/globals.css b/src/app/globals.css index 9d0e0a8b..4e62328e 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -3,6 +3,11 @@ @tailwind utilities; @layer base { + @font-face { + font-family: 'Pretendard'; + src: url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.8/dist/web/static/pretendard.css'); + } + :root { --bgColor: rgb(255, 255, 255); --slate9: rgb(16, 23, 41); diff --git a/src/app/layout.tsx b/src/app/layout.tsx index e931ec68..6816cf30 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,11 +1,7 @@ import { Providers, ThemeButton } from '@/components' -import { cls } from '@/utils' import type { Metadata } from 'next' -import { Inter } from 'next/font/google' import './globals.css' -const inter = Inter({ subsets: ['latin'] }) - export const metadata: Metadata = { title: 'Create Next App', description: 'Generated by create next app', @@ -18,7 +14,7 @@ export default function RootLayout({ }) { return ( - +
{children}
diff --git a/tailwind.config.ts b/tailwind.config.ts index d3d730cd..3b641881 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -1,4 +1,5 @@ import type { Config } from 'tailwindcss' +import { fontFamily } from 'tailwindcss/defaultTheme' const config: Config = { content: [ @@ -45,6 +46,9 @@ const config: Config = { 'gradient-conic': 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))', }, + fontFamily: { + sans: ['"Pretendard"', ...fontFamily.sans], + }, }, }, plugins: [], From 9427dabd4439405bc0d2e4ad0535e47e9b46371f Mon Sep 17 00:00:00 2001 From: eeseung Date: Tue, 31 Oct 2023 00:14:48 +0900 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20#4=20-=20Chip=20=EC=BB=B4=ED=8F=AC?= =?UTF-8?q?=EB=84=8C=ED=8A=B8=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/Chip/Chip.tsx | 31 +++++++++++++++++++ src/components/common/Chip/constants/index.ts | 10 ++++++ src/components/index.ts | 1 + 3 files changed, 42 insertions(+) create mode 100644 src/components/common/Chip/Chip.tsx create mode 100644 src/components/common/Chip/constants/index.ts diff --git a/src/components/common/Chip/Chip.tsx b/src/components/common/Chip/Chip.tsx new file mode 100644 index 00000000..10a0ca86 --- /dev/null +++ b/src/components/common/Chip/Chip.tsx @@ -0,0 +1,31 @@ +import { cls } from '@/utils' +import { COLORS } from './constants' + +export type ChipColors = + | 'emerald' + | 'red' + | 'yellow' + | 'blue' + | 'indigo' + | 'purple' + | 'pink' + | 'gray' + +export interface ChipProps { + label: string + color?: ChipColors +} + +const Chip = ({ label, color = 'emerald' }: ChipProps) => { + return ( +
+ {label} +
+ ) +} + +export default Chip diff --git a/src/components/common/Chip/constants/index.ts b/src/components/common/Chip/constants/index.ts new file mode 100644 index 00000000..27a64329 --- /dev/null +++ b/src/components/common/Chip/constants/index.ts @@ -0,0 +1,10 @@ +export const COLORS = { + emerald: 'bg-emerald-200 text-emerald-900', + red: 'bg-red-200 text-red-900', + yellow: 'bg-yellow-200 text-yellow-900', + blue: 'bg-blue-200 text-blue-900', + indigo: 'bg-indigo-200 text-indigo-900', + purple: 'bg-purple-200 text-purple-900', + pink: 'bg-pink-200 text-pink-900', + gray: 'bg-gray-200 text-gray-900', +} diff --git a/src/components/index.ts b/src/components/index.ts index d813969e..d79dffb7 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -1,2 +1,3 @@ export { default as Providers } from './Providers/providers' export { default as ThemeButton } from './ThemeButton/themeButton' +export { default as Chip } from './common/Chip/Chip'