-
Notifications
You must be signed in to change notification settings - Fork 23
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 nested tabs (up to one level) #167
Conversation
[key: string]: { | ||
texts: string[] | ||
checkedInd: number | ||
parentText: string | null |
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.
For now tabs can only have one parent. So you can't create a nested tab set inside a nested tab.
<toggle>
<tab>
I'm the top level tab!
<toggle>
<tab>
I'm nested tab! this works fine
<toggle>
<tab>
I'm a nested tab inside a nested tab. this will not work
</tab>
</toggle>
</tab>
</toggle>
</tab>
</toggle>
If this gets merged, I'll open an issue for allowing nested tabs go past one level.
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.
I'm not sure we'll ever need more levels; so not worth bothering (unless easy to do).
content/docs/cml-with-dvc.md
Outdated
@@ -75,6 +75,25 @@ few examples for some of the most frequently used providers: | |||
- `AWS_SECRET_ACCESS_KEY` | |||
- `AWS_SESSION_TOKEN` **(optional)** | |||
|
|||
<toggle> |
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.
As usual, I've placed a couple nested tabs inside /doc/cml-with-dvc
for testing. This pull request will be a draft until its approved and I delete this code.
I have full control of the styling for nested tabs. If anyone has some suggestions on the styling for the nested tabs, I'll be able to implement them easily :) |
Yes, vis. iterative/gatsby-theme-iterative#138. Could be fixed in a separate PR or this one - up to you. |
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.
Looks good to me! I'm thinking an implementation of nesting with the React Context API in the toggle component could support arbitrary levels, but this functions perfectly fine!
This reverts commit 90da36e.
See nested tabs: https://cml-dev-add-nested-tabs-z82eiy.herokuapp.com/doc/cml-with-dvc
Fixes #158