Skip to content

Commit

Permalink
prevent user margin-right style
Browse files Browse the repository at this point in the history
  • Loading branch information
evansjohnson committed Jul 3, 2024
1 parent 74cd3ea commit 8734e28
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/core/src/components/tabs/tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,12 @@ export class Tabs extends AbstractPureComponent<TabsProps, TabsState> {
return (
<TabTitle
{...child.props}
// add margin-right as inline style to reduce chance of double spacing between tabs
// after switching from margin-right to gap in #6834
// some consumers may have targeted the default margin-right to override it and this
// should wipe out their override and at least reset them to the default gap style
// instead of applying both the gap style and whatever margin-right they have defined
style={{ ...child.props.style, marginRight: 0 }}
parentId={this.props.id}
onClick={this.handleTabClick}
selected={id === this.state.selectedTabId}
Expand Down

0 comments on commit 8734e28

Please sign in to comment.