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

[Visual Refresh] Remove support for accentSecondary badges #8227

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
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 @@ -46,9 +46,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
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 @@ -55,7 +55,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