Skip to content

Commit 77efabc

Browse files
authored
Clean up badgeColors and avatarColors from the v5 and default themes (#972)
* Clean up `badgeColors` and `avatarColors` from the v5 and default themes * revert prettier changes * more updates * updates
1 parent 2bdb4fc commit 77efabc

File tree

8 files changed

+5
-36
lines changed

8 files changed

+5
-36
lines changed

src/badges/stories/index.stories.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ storiesOf('badges', module)
2929
<ThemeConsumer>
3030
{theme => (
3131
<Box style={{ ...wrapperStyles }}>
32-
{theme.badgeColors.map(color => (
32+
{Object.keys(theme.tokens.fills).map(color => (
3333
<Box key={color}>
3434
<Badge color={color} {...baseStyles}>
3535
{color}
@@ -47,7 +47,7 @@ storiesOf('badges', module)
4747
<ThemeConsumer>
4848
{theme => (
4949
<Box style={{ ...wrapperStyles }}>
50-
{theme.badgeColors.map((color, index) => {
50+
{Object.keys(theme.tokens.fills).map((color, index) => {
5151
return (
5252
<Box
5353
key={color}

src/theme/src/themes/default/component-specific/avatarColors.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/theme/src/themes/default/component-specific/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// Simple Properties.
22
export { default as overlayBackgroundColor } from './overlayBackgroundColor'
3-
export { default as avatarColors } from './avatarColors'
4-
export { default as badgeColors } from './badgeColors'
53
export { default as spinnerColor } from './spinnerColor'
64

75
export { default as getTextDropdownButtonClassName } from './getTextDropdownButtonClassName'

src/theme/src/themes/default/index.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ import { headings, text, fontFamilies, paragraph } from './typography'
3636
* These ARE REQUIRED for Evergreen to work.
3737
*/
3838
import {
39-
avatarColors,
40-
badgeColors,
4139
getTextDropdownButtonClassName,
4240
getTableCellClassName,
4341
getRowClassName,
@@ -52,7 +50,7 @@ import {
5250
* ---
5351
* These ARE REQUIRED for Evergreen to work.
5452
*/
55-
import { getIconSizeForIconButton, getElevation } from './theme-helpers'
53+
import { getElevation } from './theme-helpers'
5654

5755
export default {
5856
// Foundational Styles.
@@ -63,17 +61,12 @@ export default {
6361
scales,
6462
tokens,
6563

66-
// Component Specific.
67-
avatarColors,
68-
badgeColors,
6964
getTextDropdownButtonClassName,
7065
getTableCellClassName,
7166
getRowClassName,
7267
getMenuItemClassName,
7368
getCodeProps,
7469

75-
// Theme Helpers.
76-
getIconSizeForIconButton,
7770
getElevation,
7871

7972
inputs,

src/theme/src/themes/v5/component-specific/avatarColors.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/theme/src/themes/v5/component-specific/badgeColors.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/theme/src/themes/v5/component-specific/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// Simple Properties.
22
export { default as overlayBackgroundColor } from './overlayBackgroundColor'
3-
export { default as avatarColors } from './avatarColors'
4-
export { default as badgeColors } from './badgeColors'
53
export { default as spinnerColor } from './spinnerColor'
64

75
// Class Name Getters.

src/theme/src/themes/v5/index.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ import { headings, text, fontFamilies, paragraph } from './typography'
3636
* These ARE REQUIRED for Evergreen to work.
3737
*/
3838
import {
39-
avatarColors,
40-
badgeColors,
4139
getTextDropdownButtonClassName,
4240
getTableCellClassName,
4341
getRowClassName,
@@ -54,7 +52,7 @@ import {
5452
* ---
5553
* These ARE REQUIRED for Evergreen to work.
5654
*/
57-
import { getIconSizeForIconButton, getElevation } from './theme-helpers'
55+
import { getElevation } from './theme-helpers'
5856

5957
export default {
6058
// Foundational Styles.
@@ -65,17 +63,14 @@ export default {
6563
scales,
6664
tokens,
6765

68-
// Component Specific.
69-
avatarColors,
70-
badgeColors,
7166
getTextDropdownButtonClassName,
7267
getTableCellClassName,
7368
getRowClassName,
7469
getMenuItemClassName,
7570
getCodeProps,
7671

7772
// Theme Helpers.
78-
getIconSizeForIconButton,
73+
7974
getElevation,
8075

8176
// Component-specific

0 commit comments

Comments
 (0)