Skip to content

Commit

Permalink
docs: change Tabs stories for activation prop (#17244)
Browse files Browse the repository at this point in the history
changes as per the explanation given in the issue #17005

No breaking changes

Co-authored-by: Taylor Jones <tay1orjones@users.noreply.github.com>
Co-authored-by: kennylam <909118+kennylam@users.noreply.github.com>
  • Loading branch information
3 people committed Aug 30, 2024
1 parent 0a5f383 commit 0943383
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 6 deletions.
10 changes: 10 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -1605,6 +1605,16 @@
"contributions": [
"code"
]
},
{
"login": "pamrulla",
"name": "Patan Amrulla Khan",
"avatar_url": "https://avatars.githubusercontent.com/u/4942741?v=4",
"profile": "https://github.com/pamrulla",
"contributions": [
"code",
"doc"
]
}
],
"commitConvention": "none"
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,9 @@ check out our [Contributing Guide](/.github/CONTRIBUTING.md) and our
<td align="center"><a href="https://github.com/Adam-Shea"><img src="https://avatars.githubusercontent.com/u/44814104?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Adam Shea</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=Adam-Shea" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/NabeelAyubee"><img src="https://avatars.githubusercontent.com/u/64087875?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Md Nabeel Ayubee</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=NabeelAyubee" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/pamrulla"><img src="https://avatars.githubusercontent.com/u/4942741?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Patan Amrulla Khan</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=pamrulla" title="Code">💻</a> <a href="https://github.com/carbon-design-system/carbon/commits?author=pamrulla" title="Documentation">📖</a></td>
</tr>
</table>

<!-- markdownlint-restore -->
Expand Down
12 changes: 7 additions & 5 deletions packages/react/src/components/Tabs/Tabs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { Grid, Column } from '../Grid';
- [Dismissable Tabs](#dismissable-tabs)
- [Vertical Tabs](#vertical-tabs)
- [Component API](#component-api)
- [Tab - render content on click](#tab---render-content-on-click)
- [Tab - tab activation modes](#tab---tab-activation-modes)
- [Tabs and the Grid - fullWidth prop](#tabs-and-the-grid---fullwidth-prop)
- [V11](#v11)
- [Tabs composition](#tabs-composition)
Expand Down Expand Up @@ -182,11 +182,13 @@ And there you have it! Working dismissable tabs.

<ArgTypes />

### Tab - render content on click
### Tab - tab activation modes

You will occasionally run into a situation where you only want Tab content to be
loaded when the Tab is clicked. In v11, to do this, you can this by setting
`activation` to `manual`:
**Tabs With Automatic Activation**: A tabs widget where tabs are automatically activated and their panel is displayed when they receive focus.

**Tabs With Manual Activation**: A tabs widget where users activate a tab and display its panel by pressing Space or Enter.

In v11, to do this, you can this by setting `activation` to `manual`:

```jsx
<Tabs>
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Tabs/Tabs.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ Playground.args = {
};

Playground.argTypes = {
automatic: {
activation: {
control: { type: 'select' },
options: ['automatic', 'manual'],
},
Expand Down

0 comments on commit 0943383

Please sign in to comment.