-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[core] feat(Tabs): allow panel prop to be a renderer #6621
[core] feat(Tabs): allow panel prop to be a renderer #6621
Conversation
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.
seems like a reasonable change. thanks for adding a unit test. just one question about the test...
id="first" | ||
panel={({ tabTitleId, tabPanelId }) => { | ||
assert.equal(tabTitleId, generateTabTitleId(ID, "first")); | ||
assert.equal(tabPanelId, generateTabPanelId(ID, "first")); |
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.
are you sure these assertions are getting run in this test? I think you need to use the Mocha async done
syntax.
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.
Yeah I was a little confused on how to write this test, was curious how you would do it.
are you sure these assertions are getting run in this test?
Yep, it does work. If I change the expected value, I see a failure.
feat(Tabs): allow
panel
prop to be a renderer, pass tabTitleId and tabPanelId to the renderer.Reason: a developer may want to use these IDs for accessibility, such as
aria-controls
.Checklist