Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#45] 프리텐다드 폰트 추가 및 스토리북 작성 #46

Merged
merged 1 commit into from
Jul 31, 2024
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
5 changes: 5 additions & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<link as="style" crossorigin href="https://cdn.jsdelivr.net/gh/orioncactus/[email protected]/dist/web/static/pretendard.min.css" rel="stylesheet" />

<script>
console.log("font loaded");
</script>
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<head>
<meta charset="UTF-8" />
<link href="/vite.svg" rel="icon" type="image/svg+xml" />
<link as="style" crossorigin href="https://cdn.jsdelivr.net/gh/orioncactus/[email protected]/dist/web/static/pretendard.min.css" rel="stylesheet" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<title>Vite + React + TS</title>
</head>
Expand Down
23 changes: 23 additions & 0 deletions src/__test__/FontTest.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { Meta, StoryObj } from '@storybook/react';

const Template = () => {
return (
<div>
<p className={'text-extra-large-title font-light'}>폰트 테스트 입니다. Light</p>
<p className={'text-extra-large-title font-medium'}> 폰트 테스트 입니다. Medium</p>
<p className={'text-extra-large-title font-semibold'}> 폰트 테스트 입니다. Semi Bold</p>
<p className={'text-extra-large-title font-bold'}> 폰트 테스트 입니다. Bold</p>
</div>
);
};

const meta: Meta = {
title: '폰트 테스트',
component: Template,
};

export default meta;

export type Story = StoryObj<typeof Template>;

export const Default: Story = {};
6 changes: 6 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
@tailwind components;
@tailwind utilities;

@layer base {
body {
font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
}
}

@layer base {
:root {
--background: 0 0% 100%;
Expand Down
Loading