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
3 changes: 3 additions & 0 deletions packages/eui/changelogs/upcoming/8762.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**Breaking changes**

- Removed `xl` size from `EuiTabs`
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ exports[`EuiPageHeaderContent props tabs is rendered 1`] = `
Tab 1
</h1>
<div
class="euiTabs emotion-euiTabs-xl"
class="euiTabs emotion-euiTabs-l"
role="tablist"
>
<button
Expand All @@ -563,7 +563,7 @@ exports[`EuiPageHeaderContent props tabs is rendered 1`] = `
type="button"
>
<span
class="euiTab__content eui-textTruncate emotion-euiTab__content-xl"
class="euiTab__content eui-textTruncate emotion-euiTab__content-l"
>
Tab 1
</span>
Expand All @@ -576,7 +576,7 @@ exports[`EuiPageHeaderContent props tabs is rendered 1`] = `
type="button"
>
<span
class="euiTab__content eui-textTruncate emotion-euiTab__content-xl"
class="euiTab__content eui-textTruncate emotion-euiTab__content-l"
>
Tab 2
</span>
Expand Down Expand Up @@ -604,7 +604,7 @@ exports[`EuiPageHeaderContent props tabs is rendered with tabsProps 1`] = `
</h1>
<div
aria-label="aria-label"
class="euiTabs testClass1 testClass2 emotion-euiTabs-xl-euiTestCss"
class="euiTabs testClass1 testClass2 emotion-euiTabs-l-euiTestCss"
data-test-subj="test subject string"
role="tablist"
>
Expand All @@ -616,7 +616,7 @@ exports[`EuiPageHeaderContent props tabs is rendered with tabsProps 1`] = `
type="button"
>
<span
class="euiTab__content eui-textTruncate emotion-euiTab__content-xl"
class="euiTab__content eui-textTruncate emotion-euiTab__content-l"
>
Tab 1
</span>
Expand All @@ -629,7 +629,7 @@ exports[`EuiPageHeaderContent props tabs is rendered with tabsProps 1`] = `
type="button"
>
<span
class="euiTab__content eui-textTruncate emotion-euiTab__content-xl"
class="euiTab__content eui-textTruncate emotion-euiTab__content-l"
>
Tab 2
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,6 @@ export const EuiPageHeaderContent: FunctionComponent<

let tabsNode;
if (tabs) {
const tabsSize: EuiTabsProps['size'] = pageTitle ? 'l' : 'xl';

const renderTabs = () => {
return tabs.map((tab, index) => {
const { label, ...tabRest } = tab;
Expand Down Expand Up @@ -302,7 +300,7 @@ export const EuiPageHeaderContent: FunctionComponent<
<>
{pageTitleNode && <EuiSpacer />}
{screenReaderPageTitle}
<EuiTabs {...tabsProps} bottomBorder={false} size={tabsSize}>
<EuiTabs {...tabsProps} bottomBorder={false} size="l">
{renderTabs()}
</EuiTabs>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,27 +84,6 @@ exports[`EuiTabs props size s renders and passes down to EuiTab children 1`] = `
</div>
`;

exports[`EuiTabs props size xl renders and passes down to EuiTab children 1`] = `
<div
class="euiTabs emotion-euiTabs-xl-bottomBorder"
role="tablist"
>
<button
aria-selected="false"
class="euiTab emotion-euiTab"
role="tab"
tabindex="-1"
type="button"
>
<span
class="euiTab__content eui-textTruncate emotion-euiTab__content-xl"
>
Tab
</span>
</button>
</div>
`;

exports[`EuiTabs renders 1`] = `
<div
aria-label="aria-label"
Expand Down
7 changes: 0 additions & 7 deletions packages/eui/src/components/tabs/tab.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,5 @@ export const euiTabContentStyles = (euiThemeContext: UseEuiTheme) => {
(x, y) => x + y
)};
`,
xl: css`
font-size: ${euiFontSize(euiThemeContext, 'l').fontSize};
line-height: ${mathWithUnits(
[euiTheme.size.xxxl, euiTheme.size.s],
(x, y) => x + y
)};
`,
};
};
3 changes: 0 additions & 3 deletions packages/eui/src/components/tabs/tabs.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,5 @@ export const euiTabsStyles = (euiThemeContext: UseEuiTheme) => {
l: css`
gap: ${euiTheme.size.l};
`,
xl: css`
gap: ${euiTheme.size.xl};
`,
};
};
3 changes: 1 addition & 2 deletions packages/eui/src/components/tabs/tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { CommonProps } from '../common';
import { euiTabsStyles } from './tabs.styles';
import { EuiTabsContext } from './tabs_context';

export const SIZES = ['s', 'm', 'l', 'xl'] as const;
export const SIZES = ['s', 'm', 'l'] as const;
export type EuiTabsSizes = (typeof SIZES)[number];

export type EuiTabsProps = HTMLAttributes<HTMLDivElement> &
Expand All @@ -40,7 +40,6 @@ export type EuiTabsProps = HTMLAttributes<HTMLDivElement> &
bottomBorder?: boolean;
/**
* Sizes affect both font size and overall size.
* Only use the `xl` size when displayed as page titles.
*/
size?: EuiTabsSizes;
};
Expand Down