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

feat(Heading): subSectionTitle を追加 #5110

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ export const Type: StoryObj<typeof Heading> = {
<Heading {...args} type="sectionTitle">
SectionTitle
</Heading>
<Heading {...args} type="subSectionTitle">
SectionTitle
</Heading>
<Heading {...args} type="blockTitle">
BlockTitle
</Heading>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ export const Type: StoryObj<typeof PageHeading> = {
<PageHeading {...args} type="sectionTitle">
SectionTitle
</PageHeading>
<PageHeading {...args} type="subSectionTitle">
SectionTitle
</PageHeading>
<PageHeading {...args} type="blockTitle">
BlockTitle
</PageHeading>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ export default {
render: (args: any) => {
const types = [
'screenTitle',
'sectionTitle',
'subSectionTitle',
'blockTitle',
'subBlockTitle',
'sectionTitle',
'subSubBlockTitle',
] as const
const tags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const
Expand Down
8 changes: 7 additions & 1 deletion packages/smarthr-ui/src/components/Text/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,23 @@ import { VariantProps, tv } from 'tailwind-variants'
type StyleType =
| 'screenTitle'
| 'sectionTitle'
| 'subSectionTitle'
| 'blockTitle'
| 'subBlockTitle'
| 'subSubBlockTitle'

export const STYLE_TYPE_MAP: { [key in StyleType]: VariantProps<typeof text> } = {
screenTitle: {
size: 'XL',
size: 'XXL',
leading: 'TIGHT',
weight: 'normal',
},
sectionTitle: {
size: 'XL',
leading: 'TIGHT',
weight: 'normal',
},
subSectionTitle: {
size: 'L',
leading: 'TIGHT',
weight: 'normal',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export const StyleType: StoryObj<typeof Text> = {
<Stack>
<Text {...args} styleType="screenTitle" />
<Text {...args} styleType="sectionTitle" />
<Text {...args} styleType="subSectionTitle" />
<Text {...args} styleType="blockTitle" />
<Text {...args} styleType="subBlockTitle" />
<Text {...args} styleType="subSubBlockTitle" />
Expand Down