-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add TypeScript types to Switcher, SwitcherDivider, SwitcherItem #13584 #14989
Conversation
DCO Assistant Lite bot All contributors have signed the DCO. |
I have read the DCO document and I hereby sign the DCO. |
✅ Deploy Preview for v11-carbon-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
For 'DCO Assistant / DCO (pull_request_target)' step to pass, is there any action required from my end? I have already commented saying "I have read the DCO document and I hereby sign the DCO." |
recheck |
|
||
export const SwitcherItems = () => ( | ||
<> | ||
<Header aria-label="IBM Platform Name"> | ||
<SkipToContent /> | ||
<HeaderName href="#" prefix="IBM"> | ||
Switcher | ||
</HeaderName> | ||
</Header> | ||
<Switcher | ||
aria-label="dummy-aria-label" | ||
role="separator" | ||
className="custom-class"> | ||
<SwitcherItem | ||
role="separator" | ||
aria-label="test-aria-label-switcheritem" | ||
aria-valuenow={'100'}> | ||
Dummy child | ||
</SwitcherItem> | ||
</Switcher> | ||
<SwitcherDivider role="separator" className="custom-class" /> | ||
<Switcher role="separator" aria-label="dummy-aria-label"> | ||
<SwitcherItem | ||
role="separator" | ||
aria-label="test-aria-label-switcheritem1" | ||
aria-valuenow={'100'}> | ||
Dummy child1 | ||
</SwitcherItem> | ||
</Switcher> | ||
<SwitcherDivider role="separator" data-testid="test-id" /> | ||
<StoryContent /> | ||
</> | ||
); | ||
|
||
SwitcherItems.storyName = 'Switcher'; |
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 delete this as these components are already used in other stories, like HeaderWActionsAndSwitcher
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.
Deleted SwitcherItems as per review commendt
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 this! Overall I think this looks good but have a few questions below
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.
Thank you!
a640108
…n-design-system#13584 (carbon-design-system#14989) * fix(react): convert js to typescript carbon-design-system#13584 * fix(react): js -> ts -SwitcherItem ,Divider carbon-design-system#13584 * fix(code): tests, proptype description carbon-design-system#13584 * fix(code): warning carbon-design-system#13584 * fix(code): deleted from storybook as per review * fix(react): incorporate feedback --------- Co-authored-by: Andrea N. Cardona <cardona.n.andrea@gmail.com>
Closes #13584
Add TypeScript types to Switcher, SwitcherDivider, SwitcherItem
Changelog
New
Changed
Removed
Testing / Reviewing
executed lint, run test suite and ensured no new failures after the commit, Added these component in UIShell storybook and verified.