Skip to content

Commit

Permalink
Woops, just remove overflow rule
Browse files Browse the repository at this point in the history
  • Loading branch information
jonambas committed May 29, 2020
1 parent c5dbf9a commit a52a71b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
7 changes: 1 addition & 6 deletions packages/matchbox/src/components/Tabs/Tabs.js
Expand Up @@ -121,12 +121,7 @@ function Tabs(props) {
}, [selected, tabs, isOverflowing, disableResponsiveBehavior]);

return (
<Container
borderBottom="400"
disableResponsiveBehavior={disableResponsiveBehavior}
{...pick(rest)}
ref={wrapperRef}
>
<Container borderBottom="400" {...pick(rest)} ref={wrapperRef}>
<Box aria-hidden={isOverflowing} overflow="hidden">
<OverflowTabContainer
aria-orientation="horizontal"
Expand Down
3 changes: 1 addition & 2 deletions packages/matchbox/src/components/Tabs/styles.js
Expand Up @@ -51,8 +51,7 @@ export const overflowTabs = ({ isOverflowing }) => `
pointer-events: ${isOverflowing ? 'none' : 'auto'};
`;

export const containerStyles = ({ disableResponsiveBehavior }) => `
export const containerStyles = () => `
position: relative;
height: ${tokens.sizing_750};
${!disableResponsiveBehavior ? `overflow: hidden;` : ''}
`;
7 changes: 0 additions & 7 deletions packages/matchbox/src/components/Tabs/tests/Tabs.test.js
Expand Up @@ -53,11 +53,4 @@ describe('Tabs', () => {
});
expect(wrapper.find('a').text()).toEqual('Tab 4');
});

it('should be able to disable responsive behavior', () => {
const wrapper = subject({
disableResponsiveBehavior: true,
});
expect(wrapper).not.toHaveStyleRule('overflow', 'hidden');
});
});

0 comments on commit a52a71b

Please sign in to comment.