-
Notifications
You must be signed in to change notification settings - Fork 141
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(SideNav): Composition できるように修正 #5157
base: master
Are you sure you want to change the base?
Conversation
commit: |
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.
諸々コメントしましたが、items を deprecated し、SideNav と SideNavItem という composition で使う状態にしてから Story を書いたほうが良さそうに思いました(書き直しになってしまいそう)。
packages/smarthr-ui/src/components/SideNav/stories/SideNav.stories.tsx
Outdated
Show resolved
Hide resolved
packages/smarthr-ui/src/components/SideNav/stories/SideNav.stories.tsx
Outdated
Show resolved
Hide resolved
packages/smarthr-ui/src/components/SideNav/stories/SideNav.stories.tsx
Outdated
Show resolved
Hide resolved
packages/smarthr-ui/src/components/SideNav/stories/SideNav.stories.tsx
Outdated
Show resolved
Hide resolved
packages/smarthr-ui/src/components/SideNav/stories/SideNav.stories.tsx
Outdated
Show resolved
Hide resolved
packages/smarthr-ui/src/components/SideNav/stories/SideNav.stories.tsx
Outdated
Show resolved
Hide resolved
packages/smarthr-ui/src/components/SideNav/stories/VRTSideNav.stories.tsx
Outdated
Show resolved
Hide resolved
packages/smarthr-ui/src/components/SideNav/stories/VRTSideNav.stories.tsx
Outdated
Show resolved
Hide resolved
@uknmr |
packages/smarthr-ui/src/components/SideNav/stories/SideNav.stories.tsx
Outdated
Show resolved
Hide resolved
packages/smarthr-ui/src/components/SideNav/stories/SideNav.stories.tsx
Outdated
Show resolved
Hide resolved
packages/smarthr-ui/src/components/SideNav/stories/SideNav.stories.tsx
Outdated
Show resolved
Hide resolved
packages/smarthr-ui/src/components/SideNav/stories/SideNav.stories.tsx
Outdated
Show resolved
Hide resolved
packages/smarthr-ui/src/components/SideNav/stories/SideNav.stories.tsx
Outdated
Show resolved
Hide resolved
parameters: { | ||
chromatic: { disableSnapshot: true }, | ||
}, | ||
tags: ['skip-test-runner'], |
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.
q: li
で怒られる?
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.
<ul>
をrenderに追加して対応
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.
<ul>
追加したのであれば、削っても大丈夫?
tags: ['skip-test-runner'], |
packages/smarthr-ui/src/components/SideNav/stories/VRTSideNav.stories.tsx
Outdated
Show resolved
Hide resolved
transform: (code: string) => | ||
code.replace(/<ul>|<\/ul>|<Stack as="ul">|<\/Stack>/g, '').trim(), |
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.
<SideNavItemButton {...args}>サイドナビ</SideNavItemButton> | ||
</ul> | ||
), | ||
argTypes: { |
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.
children を control: 'text'
で足したい
child as React.ReactElement<ComponentProps<typeof SideNavItemButton>>, | ||
{ | ||
size, | ||
...(childProps.onClick ? {} : { onClick }), |
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.
パッと見、消してしまいそうなのでコメントを残しとくとよさそう
const sideNavItem = tv({ | ||
slots: { | ||
wrapper: ['smarthr-ui-SideNav-item'], | ||
wrapper: ['smarthr-ui-SideNav-item', 'shr-list-none'], |
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.
SideNav 側で指定されてるので不要そう(Story のためであれば Story に書くのがよさそう)
parameters: { | ||
chromatic: { disableSnapshot: true }, | ||
}, | ||
tags: ['skip-test-runner'], |
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.
<ul>
追加したのであれば、削っても大丈夫?
tags: ['skip-test-runner'], |
関連URL
https://smarthr.atlassian.net/browse/SHRUI-1143
概要
SideNavのstoryの見直しをしました。
変更内容
確認方法
Chromaticで確認