Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ function TabContent({
// fail-safe or fail-fast? not sure what's best here
return null;
}
return cloneElement(selectedTabItem, {className: 'margin-top--md'});
return cloneElement(selectedTabItem, {
className: clsx('margin-top--md', selectedTabItem.props.className),
});
}
return (
<div className="margin-top--md">
Expand Down
14 changes: 14 additions & 0 deletions website/_dogfooding/_pages tests/tabs-tests.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,17 @@ export const isMacOS = typeof window !== 'undefined' && navigator.platform.start
```

When clicking tabs above, they should stay under cursor and we should adjust the scroll position.

## Tabs with className and lazy loading

<Tabs lazy>
<TabItem value="apple" label="Apple" className="alert alert--primary" default>
This is an apple 🍎
</TabItem>
<TabItem value="orange" label="Orange" className="alert alert--secondary">
This is an orange 🍊
</TabItem>
<TabItem value="banana" label="Banana" className="alert alert--success">
This is a banana 🍌
</TabItem>
</Tabs>