Skip to content

Commit

Permalink
[Visual Refresh] Remove support for accentSecondary badges (elastic#8227
Browse files Browse the repository at this point in the history
)
  • Loading branch information
mgadewoll committed Jan 10, 2025
1 parent 3126680 commit 05533bf
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 80 deletions.
8 changes: 1 addition & 7 deletions packages/eui/src-docs/src/views/badge/beta_badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@ import { css } from '@emotion/react';

import { EuiBetaBadge, EuiSpacer, EuiTitle } from '../../../../src/components';

const colors = [
'hollow',
'accent',
'accentSecondary',
'subdued',
'warning',
] as const;
const colors = ['hollow', 'accent', 'subdued', 'warning'] as const;

export default () => (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,23 +175,6 @@ exports[`EuiBadge props color accent is rendered 1`] = `
</span>
`;

exports[`EuiBadge props color accentSecondary is rendered 1`] = `
<span
class="euiBadge emotion-euiBadge-accentSecondary"
title="Content"
>
<span
class="euiBadge__content emotion-euiBadge__content"
>
<span
class="euiBadge__text emotion-euiBadge__text"
>
Content
</span>
</span>
</span>
`;

exports[`EuiBadge props color accepts hex 1`] = `
<span
class="euiBadge emotion-euiBadge"
Expand Down Expand Up @@ -432,24 +415,6 @@ exports[`EuiBadge props style is rendered with accent 1`] = `
</span>
`;

exports[`EuiBadge props style is rendered with accentSecondary 1`] = `
<span
class="euiBadge emotion-euiBadge-accentSecondary"
style="border: 4px solid tomato;"
title="Content"
>
<span
class="euiBadge__content emotion-euiBadge__content"
>
<span
class="euiBadge__text emotion-euiBadge__text"
>
Content
</span>
</span>
</span>
`;

exports[`EuiBadge props style is rendered with danger 1`] = `
<span
class="euiBadge emotion-euiBadge-danger"
Expand Down
1 change: 0 additions & 1 deletion packages/eui/src/components/badge/badge.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ export const euiBadgeStyles = (euiThemeContext: UseEuiTheme) => {
`,
primary: css(setBadgeColorVars(badgeColors.primary)),
accent: css(setBadgeColorVars(badgeColors.accent)),
accentSecondary: css(setBadgeColorVars(badgeColors.accentSecondary)),
warning: css(setBadgeColorVars(badgeColors.warning)),
danger: css(setBadgeColorVars(badgeColors.danger)),
success: css(setBadgeColorVars(badgeColors.success)),
Expand Down
1 change: 0 additions & 1 deletion packages/eui/src/components/badge/badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export const COLORS = [
'primary',
'success',
'accent',
'accentSecondary',
'warning',
'danger',
] as const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,6 @@ exports[`EuiBetaBadge props color accent is rendered 1`] = `
</span>
`;

exports[`EuiBetaBadge props color accentSecondary is rendered 1`] = `
<span>
<span
class="euiBetaBadge emotion-euiBetaBadge-accentSecondary-m-baseline"
title="Beta"
>
Beta
</span>
</span>
`;

exports[`EuiBetaBadge props color hollow is rendered 1`] = `
<span>
<span
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ export const euiBetaBadgeStyles = (euiThemeContext: UseEuiTheme) => {
accent: hasVisColorAdjustment
? css(badgeColors.accentText)
: css(badgeColors.accent),
accentSecondary: hasVisColorAdjustment
? css(badgeColors.accentSecondaryText)
: css(badgeColors.accentSecondary),
subdued: css(badgeColors.subdued),
hollow: css`
color: ${badgeColors.hollow.color};
Expand Down
8 changes: 1 addition & 7 deletions packages/eui/src/components/badge/beta_badge/beta_badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,7 @@ import { EuiIcon, IconType } from '../../icon';

import { euiBetaBadgeStyles } from './beta_badge.styles';

export const COLORS = [
'accent',
'accentSecondary',
'subdued',
'hollow',
'warning',
] as const;
export const COLORS = ['accent', 'subdued', 'hollow', 'warning'] as const;
export type BetaBadgeColor = (typeof COLORS)[number];

export const SIZES = ['s', 'm'] as const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@ exports[`EuiNotificationBadge props color accent is rendered 1`] = `
</span>
`;

exports[`EuiNotificationBadge props color accentSecondary is rendered 1`] = `
<span
class="euiNotificationBadge emotion-euiNotificationBadge-s-accentSecondary"
>
5
</span>
`;

exports[`EuiNotificationBadge props color subdued is rendered 1`] = `
<span
class="euiNotificationBadge emotion-euiNotificationBadge-s-subdued"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export const euiNotificationBadgeStyles = (euiThemeContext: UseEuiTheme) => {
`,
// Colors
accent: css(badgeColors.accentText),
accentSecondary: css(badgeColors.accentSecondaryText),
success: css(badgeColors.success),
subdued: css(badgeColors.subdued),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ import { CommonProps } from '../../common';

import { euiNotificationBadgeStyles } from './badge_notification.styles';

export const COLORS = [
'accent',
'accentSecondary',
'subdued',
'success',
] as const;
export const COLORS = ['accent', 'subdued', 'success'] as const;
export type BadgeNotificationColor = (typeof COLORS)[number];

export const SIZES = ['s', 'm'] as const;
Expand Down

0 comments on commit 05533bf

Please sign in to comment.