-
Notifications
You must be signed in to change notification settings - Fork 0
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
chore (refs T33323): add storybook documentation to DpTabs. #344
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
85b34c1
chore (refs T33323): add storybook documentation to DpTabs.
ahmad-demos a85459c
chore (refs T33323): add CHANGELOG
ahmad-demos 1ee9a6d
Update src/components/DpTabs/DpTabs.stories.mdx
ahmad-demos 980833f
Update src/components/DpTabs/DpTabs.stories.mdx
ahmad-demos b37925c
Update src/components/DpTabs/DpTabs.stories.mdx
ahmad-demos 7d35927
Update src/components/DpTabs/DpTabs.stories.mdx
ahmad-demos 310f9ab
Update src/components/DpTabs/DpTabs.stories.mdx
ahmad-demos 7a5c604
Update src/components/DpTabs/DpTabs.stories.mdx
ahmad-demos 1726e45
Update src/components/DpTabs/DpTabs.stories.mdx
ahmad-demos 579d5ac
chore (refs T33323): edit comment.
ahmad-demos 6fb4106
chore (refs T33323): add CHANGELOG
ahmad-demos 59b2c5b
chore (refs T33323): remove props.
ahmad-demos 9b6c92e
Update CHANGELOG.md
ahmad-demos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { Meta } from '@storybook/addon-docs' | ||
import DpTabs from './DpTabs' | ||
|
||
<Meta | ||
title="Components/Tabs" | ||
component={DpTabs} /> | ||
|
||
# DpTabs | ||
|
||
The DpTabs component provides a structured and interactive way to organize and navigate related content, allowing users to switch between different views while keeping context. | ||
|
||
DpTabs and DpTab both provide a default slot. For each tab, a `DpTab` instance is placed inside the default slot of `DpTabs`, while the content of each tab is placed inside the default slot of the respective `DpTab` instance. | ||
|
||
The `DpTab` instances are then aligned horizontally, and each tab is associated with its header. | ||
|
||
## Default usage | ||
|
||
```html | ||
<dp-tabs | ||
tab-size="medium" | ||
:active-id="activeTabId" | ||
use-url-fragment | ||
@change="setActiveTabId"> <!-- call a method --> | ||
<dp-tab | ||
id="idTab1" | ||
label="Tab Title 1"> | ||
<slot> | ||
Tab content 1. | ||
</slot> | ||
</dp-tab> | ||
<dp-tab | ||
id="idTab2" | ||
label="Tab Title 2"> | ||
<slot> | ||
Tab content 2. | ||
</slot> | ||
</dp-tab> | ||
</dp-tabs> | ||
``` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
An "Added" section already exists!
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.
Done in 6fb4106