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

[Emotion] EuiTabs #6311

Merged
merged 18 commits into from
Oct 27, 2022
Merged
Show file tree
Hide file tree
Changes from 17 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
1 change: 0 additions & 1 deletion src/components/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@
@import 'steps/index';
@import 'suggest/index';
@import 'table/index';
@import 'tabs/index';
Original file line number Diff line number Diff line change
Expand Up @@ -324,30 +324,30 @@ exports[`EuiPageHeader props page content props are passed down is rendered 1`]
/>
<div
aria-label="aria-label"
class="euiTabs euiTabs--large testClass1 testClass2"
class="euiTabs testClass1 testClass2 emotion-euiTabs-l"
data-test-subj="test subject string"
role="tablist"
>
<button
aria-selected="true"
class="euiTab euiTab-isSelected"
class="euiTab euiTab-isSelected emotion-euiTab-selected-l"
role="tab"
type="button"
>
<span
class="euiTab__content"
class="euiTab__content emotion-euiTab__content-l-selected"
>
Tab 1
</span>
</button>
<button
aria-selected="false"
class="euiTab"
class="euiTab emotion-euiTab-l"
role="tab"
type="button"
>
<span
class="euiTab__content"
class="euiTab__content emotion-euiTab__content-l"
>
Tab 2
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,29 +285,29 @@ exports[`EuiPageHeaderContent props children is rendered even if content props a
class="euiSpacer euiSpacer--l emotion-euiSpacer-l"
/>
<div
class="euiTabs euiTabs--large"
class="euiTabs emotion-euiTabs-l"
role="tablist"
>
<button
aria-selected="true"
class="euiTab euiTab-isSelected"
class="euiTab euiTab-isSelected emotion-euiTab-selected-l"
role="tab"
type="button"
>
<span
class="euiTab__content"
class="euiTab__content emotion-euiTab__content-l-selected"
>
Tab 1
</span>
</button>
<button
aria-selected="false"
class="euiTab"
class="euiTab emotion-euiTab-l"
role="tab"
type="button"
>
<span
class="euiTab__content"
class="euiTab__content emotion-euiTab__content-l"
>
Tab 2
</span>
Expand Down Expand Up @@ -574,29 +574,29 @@ exports[`EuiPageHeaderContent props tabs is rendered 1`] = `
Tab 1
</h1>
<div
class="euiTabs euiTabs--xlarge"
class="euiTabs emotion-euiTabs-xl"
role="tablist"
>
<button
aria-selected="true"
class="euiTab euiTab-isSelected"
class="euiTab euiTab-isSelected emotion-euiTab-selected-xl"
role="tab"
type="button"
>
<span
class="euiTab__content"
class="euiTab__content emotion-euiTab__content-xl-selected"
>
Tab 1
</span>
</button>
<button
aria-selected="false"
class="euiTab"
class="euiTab emotion-euiTab-xl"
role="tab"
type="button"
>
<span
class="euiTab__content"
class="euiTab__content emotion-euiTab__content-xl"
>
Tab 2
</span>
Expand Down Expand Up @@ -624,30 +624,30 @@ exports[`EuiPageHeaderContent props tabs is rendered with tabsProps 1`] = `
</h1>
<div
aria-label="aria-label"
class="euiTabs euiTabs--xlarge testClass1 testClass2"
class="euiTabs testClass1 testClass2 emotion-euiTabs-xl"
data-test-subj="test subject string"
role="tablist"
>
<button
aria-selected="true"
class="euiTab euiTab-isSelected"
class="euiTab euiTab-isSelected emotion-euiTab-selected-xl"
role="tab"
type="button"
>
<span
class="euiTab__content"
class="euiTab__content emotion-euiTab__content-xl-selected"
>
Tab 1
</span>
</button>
<button
aria-selected="false"
class="euiTab"
class="euiTab emotion-euiTab-xl"
role="tab"
type="button"
>
<span
class="euiTab__content"
class="euiTab__content emotion-euiTab__content-xl"
>
Tab 2
</span>
Expand Down
32 changes: 14 additions & 18 deletions src/components/tabs/__snapshots__/tab.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@
exports[`EuiTab props append is rendered 1`] = `
<button
aria-selected="false"
class="euiTab"
class="euiTab emotion-euiTab"
role="tab"
type="button"
>
<span
class="euiTab__prepend"
>
<span>
Append
</span>
<span
class="euiTab__content"
class="euiTab__content emotion-euiTab__content"
>
children
</span>
Expand All @@ -23,13 +21,13 @@ exports[`EuiTab props append is rendered 1`] = `
exports[`EuiTab props disabled is rendered 1`] = `
<button
aria-selected="false"
class="euiTab euiTab-isDisabled"
class="euiTab emotion-euiTab-disabled"
disabled=""
role="tab"
type="button"
>
<span
class="euiTab__content"
class="euiTab__content emotion-euiTab__content-disabled"
>
Click Me
</span>
Expand All @@ -40,14 +38,14 @@ exports[`EuiTab props href renders anchor 1`] = `
<a
aria-label="aria-label"
aria-selected="false"
class="euiTab testClass1 testClass2"
class="euiTab testClass1 testClass2 emotion-euiTab"
data-test-subj="test subject string"
href="/baz/bing"
rel="noreferrer"
role="tab"
>
<span
class="euiTab__content"
class="euiTab__content emotion-euiTab__content"
>
children
</span>
Expand All @@ -57,12 +55,12 @@ exports[`EuiTab props href renders anchor 1`] = `
exports[`EuiTab props isSelected is rendered 1`] = `
<button
aria-selected="true"
class="euiTab euiTab-isSelected"
class="euiTab euiTab-isSelected emotion-euiTab-selected"
role="tab"
type="button"
>
<span
class="euiTab__content"
class="euiTab__content emotion-euiTab__content-selected"
>
children
</span>
Expand All @@ -73,13 +71,13 @@ exports[`EuiTab props onClick renders button 1`] = `
<button
aria-label="aria-label"
aria-selected="false"
class="euiTab testClass1 testClass2"
class="euiTab testClass1 testClass2 emotion-euiTab"
data-test-subj="test subject string"
role="tab"
type="button"
>
<span
class="euiTab__content"
class="euiTab__content emotion-euiTab__content"
>
children
</span>
Expand All @@ -89,17 +87,15 @@ exports[`EuiTab props onClick renders button 1`] = `
exports[`EuiTab props prepend is rendered 1`] = `
<button
aria-selected="false"
class="euiTab"
class="euiTab emotion-euiTab"
role="tab"
type="button"
>
<span
class="euiTab__prepend"
>
<span>
Prepend
</span>
<span
class="euiTab__content"
class="euiTab__content emotion-euiTab__content"
>
children
</span>
Expand Down
36 changes: 12 additions & 24 deletions src/components/tabs/__snapshots__/tabs.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,56 +2,44 @@

exports[`EuiTabs props expand is rendered 1`] = `
<div
class="euiTabs euiTabs--expand euiTabs--bottomBorder"
class="euiTabs emotion-euiTabs-m-bottomBorder"
role="tablist"
>
children
</div>
/>
`;

exports[`EuiTabs props size l is rendered 1`] = `
<div
class="euiTabs euiTabs--large euiTabs--bottomBorder"
class="euiTabs emotion-euiTabs-l-bottomBorder"
role="tablist"
>
children
</div>
/>
`;

exports[`EuiTabs props size m is rendered 1`] = `
<div
class="euiTabs euiTabs--bottomBorder"
class="euiTabs emotion-euiTabs-m-bottomBorder"
role="tablist"
>
children
</div>
/>
`;

exports[`EuiTabs props size s is rendered 1`] = `
<div
class="euiTabs euiTabs--small euiTabs--bottomBorder"
class="euiTabs emotion-euiTabs-s-bottomBorder"
role="tablist"
>
children
</div>
/>
`;

exports[`EuiTabs props size xl is rendered 1`] = `
<div
class="euiTabs euiTabs--xlarge euiTabs--bottomBorder"
class="euiTabs emotion-euiTabs-xl-bottomBorder"
role="tablist"
>
children
</div>
/>
`;

exports[`EuiTabs renders 1`] = `
<div
aria-label="aria-label"
class="euiTabs euiTabs--bottomBorder testClass1 testClass2"
class="euiTabs testClass1 testClass2 emotion-euiTabs-m-bottomBorder"
data-test-subj="test subject string"
role="tablist"
>
children
</div>
/>
`;
1 change: 0 additions & 1 deletion src/components/tabs/_index.scss

This file was deleted.

Loading