Skip to content
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

fix(components): replace TabList component selector #616

Merged
merged 1 commit into from
Jun 11, 2020
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
2 changes: 1 addition & 1 deletion src/__snapshots__/storyshots.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -13400,7 +13400,7 @@ exports[`Storyshots Components/Tabs Links 1`] = `
}

@media (max-width:479px) {
.circuit-6 > .circuit-1 {
.circuit-6 [role='tab'] {
-webkit-flex: 1 1 auto;
-ms-flex: 1 1 auto;
flex: 1 1 auto;
Expand Down
6 changes: 3 additions & 3 deletions src/components/Tabs/__snapshots__/Tabs.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ exports[`Tabs styles should render with default styles 1`] = `
}

@media (max-width:479px) {
.circuit-4 > .circuit-1 {
.circuit-4 [role='tab'] {
-webkit-flex: 1 1 auto;
-ms-flex: 1 1 auto;
flex: 1 1 auto;
Expand Down Expand Up @@ -302,7 +302,7 @@ exports[`Tabs styles should render with stretched styles 1`] = `
flex-wrap: nowrap;
}

.circuit-4 > .circuit-1 {
.circuit-4 [role='tab'] {
-webkit-flex: 1 1 auto;
-ms-flex: 1 1 auto;
flex: 1 1 auto;
Expand All @@ -313,7 +313,7 @@ exports[`Tabs styles should render with stretched styles 1`] = `
}

@media (max-width:479px) {
.circuit-4 > .circuit-1 {
.circuit-4 [role='tab'] {
-webkit-flex: 1 1 auto;
-ms-flex: 1 1 auto;
flex: 1 1 auto;
Expand Down
2 changes: 0 additions & 2 deletions src/components/Tabs/components/Tab/Tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ Tab.defaultProps = {
role: 'tab'
};

export { StyledTab };

/**
* @component
*/
Expand Down
3 changes: 1 addition & 2 deletions src/components/Tabs/components/Tab/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* limitations under the License.
*/

import Tab, { StyledTab } from './Tab';
import Tab from './Tab';

export { StyledTab };
export default Tab;
4 changes: 1 addition & 3 deletions src/components/Tabs/components/TabList/TabList.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ import { css } from '@emotion/core';

import { shadowDouble } from '../../../../styles/style-helpers';

import { StyledTab } from '../Tab';

const MOBILE_AUTOSTRETCH_ITEMS_MAX = 3;
const DEFAULT_HEIGHT = '80px';

Expand All @@ -43,7 +41,7 @@ const navigationBaseStyles = css`
`;

const stretchedStyles = ({ children, theme }) => css`
& > ${StyledTab} {
& [role='tab'] {
flex: 1 1 auto;
padding: 0 ${theme.spacings.kilo};
width: ${Math.floor(100 / children.length)}%;
Expand Down