-
Notifications
You must be signed in to change notification settings - Fork 38
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
/reactのStorybook CSF3化 button編 #433
Conversation
Size Change: -215 B (0%) Total Size: 623 kB
ℹ️ View Unchanged
|
Visit the preview URL for this PR (updated for commit f81e0ec): https://pixiv-charcoal-web--pr433-mimo-csf3-react-butt-fg00el5q.web.app (expires Mon, 05 Feb 2024 05:47:48 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 314b26d3adca98a761c7e4d9922ebb206ff024a0 |
82f765c
to
d76a24f
Compare
Cancel | ||
export const Focus: StoryObj<typeof Button> = { | ||
render: (args: ButtonProps) => { | ||
// eslint-disable-next-line react-hooks/rules-of-hooks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use a named function to avoid a lint error.
render: function Render() {
const [checked, setChecked] = useState(false)
Mouse over to focus | ||
export const Nihongo: StoryObj<typeof Button> = { | ||
render: (args) => ( | ||
<Button {...args} onClick={action('click')}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we're using @storybook/addon-essentials, I would suggest that onClick={action('click')} may be unnecessary.
d76a24f
to
b70d0cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, LGTM.
b70d0cc
to
f81e0ec
Compare
やったこと
動作確認環境
storybook
チェックリスト
不要なチェック項目は消して構いません