Skip to content

Commit

Permalink
chore: HintTextのStoryファイルを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
abcang authored and yue4u committed Dec 24, 2024
1 parent ffa82a1 commit 6c8b00e
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions packages/react-sandbox/src/components/HintText/index.story.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { Meta, StoryObj } from '@storybook/react'
import HintText from '.'

export default {
title: 'react-sandbox/HintText',
component: HintText,
parameters: {
layout: 'centered',
},
argTypes: {
children: { type: 'string' },
context: {
control: {
type: 'select',
options: ['page', 'section'],
},
},
},
} as Meta<typeof HintText>

export const Default: StoryObj<typeof HintText> = {
args: {
children: 'HintText',
context: 'section',
},
render: (props) => <HintText {...props} />,
}

export const NarrowWidth: StoryObj<typeof HintText> = {
args: {
children: 'LongLongLongLongLongLongLongLongLongText',
context: 'section',
},
render: (props) => (
<div style={{ width: 200 }}>
<HintText {...props} />
</div>
),
}

0 comments on commit 6c8b00e

Please sign in to comment.