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

Fix props #70

Merged
merged 3 commits into from
Apr 22, 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
2 changes: 1 addition & 1 deletion src/components/Heading/Heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type Props = {
* レンダリングされるHTML要素
* @default p
*/
as: HTMLTagname;
as?: HTMLTagname;
/**
* テキストのカラーバリエーション
* @default secondary
Expand Down
4 changes: 4 additions & 0 deletions src/components/Text/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ type HeadingProps = BaseProps & {
size?: HeadingFontSize;
/**
* 行送りの抽象値(`line-height`)
* @default default
*/
leading?: 'default';
};
Expand All @@ -80,6 +81,7 @@ type NoteProps = BaseProps & {
size?: NoteFontSize;
/**
* 行送りの抽象値(`line-height`)
* @default default
*/
leading?: NoteLeading;
};
Expand All @@ -96,6 +98,7 @@ type ButtonProps = BaseProps & {
size?: ButtonFontSize;
/**
* 行送りの抽象値(`line-height`)
* @default default
*/
leading?: 'default';
};
Expand All @@ -112,6 +115,7 @@ type TagProps = BaseProps & {
size?: TagFontSize;
/**
* 行送りの抽象値(`line-height`)
* @default default
*/
leading?: 'default';
};
Expand Down
30 changes: 10 additions & 20 deletions src/stories/Heading.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,42 +11,32 @@ type Story = StoryObj<typeof Heading>;
export const Default: Story = {
render: () => (
<Stack spacing="md">
<Heading as="p" size="xs">
xs: スマートフォン問診
</Heading>
<Heading as="p" size="xs">
<Heading size="xs">xs: スマートフォン問診</Heading>
<Heading size="xs">
xs: スマートフォン問診を利用できる
<br />
近くの医療機関から調べる
</Heading>
<Heading as="p" size="sm">
sm: スマートフォン問診
</Heading>
<Heading as="p" size="sm">
<Heading size="sm">sm: スマートフォン問診</Heading>
<Heading size="sm">
sm: スマートフォン問診を利用できる
<br />
近くの医療機関から調べる
</Heading>
<Heading as="p" size="md">
md: スマートフォン問診
</Heading>
<Heading as="p" size="md">
<Heading size="md">md: スマートフォン問診</Heading>
<Heading size="md">
md: スマートフォン問診を利用できる
<br />
近くの医療機関から調べる
</Heading>
<Heading as="p" size="lg">
lg: スマートフォン問診
</Heading>
<Heading as="p" size="lg">
<Heading size="lg">lg: スマートフォン問診</Heading>
<Heading size="lg">
lg: スマートフォン問診を利用できる
<br />
近くの医療機関から調べる
</Heading>
<Heading as="p" size="xl">
xl: スマートフォン問診
</Heading>
<Heading as="p" size="xl">
<Heading size="xl">xl: スマートフォン問診</Heading>
<Heading size="xl">
xl: スマートフォン問診を利用できる
<br />
近くの医療機関から調べる
Expand Down