diff --git a/app/components/Title/SubTitle.css b/app/components/Title/SubTitle.css new file mode 100644 index 0000000..0cc792a --- /dev/null +++ b/app/components/Title/SubTitle.css @@ -0,0 +1,18 @@ +.sub-title { + color: #9D9F9F; + font-weight: 900; +} + +.home-sub-title { + width: 440px; + height: 36px; + font-size: 30px; + font-weight: 400; +} + +.section-sub-title { + width: 449px; + height: 43px; + font-size: 36px; + font-weight: 900; +} \ No newline at end of file diff --git a/app/components/Title/SubTitle.tsx b/app/components/Title/SubTitle.tsx new file mode 100644 index 0000000..723f804 --- /dev/null +++ b/app/components/Title/SubTitle.tsx @@ -0,0 +1,21 @@ +import './SubTitle.css'; + +export interface SubTitleProps { + label: string; + variant?: 'home' | 'section'; +} + +export const SubTitle = ({ + label, + variant = 'section', + ...props +}: SubTitleProps) => { + return ( +
+ {label} +
+ ); +} \ No newline at end of file diff --git a/app/components/Title/Title.css b/app/components/Title/Title.css new file mode 100644 index 0000000..2077419 --- /dev/null +++ b/app/components/Title/Title.css @@ -0,0 +1,40 @@ +.title { + font-weight: 900; + color: #F5F5F5; + font-size: 96px; +} + +.home-title { + width: 537px; + height: 115px; +} + +.section-title { + width: 419px; + height: 115px; +} + +.t-highlight { + color: #1E89E0; +} + +.title-container { + display: flex; + flex-direction: column; + gap: 10px; +} + +.title-container-center { + align-items: center; + text-align: center; +} + +.title-container-left { + align-items: flex-start; + text-align: left; +} + +.title-container-right { + align-items: flex-end; + text-align: right; +} \ No newline at end of file diff --git a/app/components/Title/Title.stories.ts b/app/components/Title/Title.stories.ts new file mode 100644 index 0000000..4cbd502 --- /dev/null +++ b/app/components/Title/Title.stories.ts @@ -0,0 +1,41 @@ +import type { Meta, StoryObj } from '@storybook/react'; +import { Title } from './Title'; + +const meta = { + title: 'Common/Title', + component: Title, + tags: ['autodocs'], + parameters: { + layout: 'centered', + }, + argTypes: { + variant: { + control: 'select', + options: ['home', 'section'], + }, + align: { + control: 'select', + options: ['left', 'right'], + } + }, +} satisfies Meta