Skip to content

Commit 481bb11

Browse files
committed
fix: icon exports and missing icons
Closes DCOS-49026
1 parent 86ca469 commit 481bb11

38 files changed

+193
-135
lines changed

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@
1717
"build:storybook": "build-storybook",
1818
"prebuild:storybook": "npm run build:design-tokens && npm run build:svg",
1919
"prebuild:design-tokens": "npm run clean:design-tokens",
20-
"prebuild:svg": "npm run clean:svg",
2120
"build:design-tokens": "node ./packages/design-tokens/scripts/build.js",
2221
"build:svg": "node ./packages/icons/scripts/build.js",
2322
"clean": "rimraf dist",
2423
"clean:design-tokens": "rm -rf ./dist/packages/design-tokens && rm -rf ./packages/design-tokens/dist/",
25-
"clean:svg": "rm -rf ./dist/packages/icons && rm -rf ./packages/icons/dist/",
2624
"commitlint": "commitlint -e",
2725
"create:component": "./scripts/create-component",
2826
"deploy:storybook": "storybook-to-ghpages",

packages/checkboxInput/tests/__snapshots__/CheckboxInput.test.tsx.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,7 @@ exports[`CheckboxInput renders indeterminate 1`] = `
439439
}
440440
441441
.emotion-1 {
442+
vertical-align: middle;
442443
fill: #FFF;
443444
}
444445

packages/design-tokens/properties/layout/iconSize.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"layout": {
33
"iconSize": {
4+
"xxs": {
5+
"value": "12px"
6+
},
47
"xs": {
58
"value": "16px"
69
},
@@ -17,7 +20,7 @@
1720
"value": "64px"
1821
},
1922
"xxl": {
20-
"value": "96"
23+
"value": "96px"
2124
}
2225
}
2326
}

packages/icon/components/Icon.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as React from "react";
22
import { cx } from "emotion";
33
import { tintSVG } from "../../shared/styles/styleUtils";
44
import {
5-
textColorPrimary,
5+
iconSizeXxs,
66
iconSizeXs,
77
iconSizeS,
88
iconSizeM,
@@ -15,6 +15,7 @@ import { ProductIcons } from "../../icons/dist/product-icons-enum";
1515
import { icon } from "../style";
1616

1717
type IconSizes =
18+
| typeof iconSizeXxs
1819
| typeof iconSizeXs
1920
| typeof iconSizeS
2021
| typeof iconSizeM
@@ -35,7 +36,7 @@ export interface IconProps {
3536

3637
const Icon = (props: IconProps) => {
3738
const { color, size, shape, ariaLabel } = props;
38-
const svgColor = color || textColorPrimary;
39+
const svgColor = color || "currentColor";
3940
const iconSize = size || iconSizeS;
4041

4142
return (

packages/icon/stories/Icon.stories.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
textColorPrimary,
1515
textColorSecondary,
1616
yellow,
17+
iconSizeXxs,
1718
iconSizeXs,
1819
iconSizeS,
1920
iconSizeM,
@@ -38,6 +39,7 @@ storiesOf("Icon", module)
3839
[purple]: "purple"
3940
};
4041
const sizes = {
42+
[iconSizeXxs]: "iconSizeXxs",
4143
[iconSizeXs]: "iconSizeXs",
4244
[iconSizeS]: "iconSizeS",
4345
[iconSizeM]: "iconSizeM",

packages/icon/style.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { css } from "emotion";
22

33
export const icon = css`
4+
vertical-align: middle;
5+
46
use {
57
pointer-events: none;
68
}

packages/icon/tests/__snapshots__/Icon.test.tsx.snap

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
exports[`Icon renders 1`] = `
44
.emotion-0 {
5+
vertical-align: middle;
56
fill: blue;
67
}
78
@@ -26,7 +27,8 @@ exports[`Icon renders 1`] = `
2627

2728
exports[`Icon renders with defaults 1`] = `
2829
.emotion-0 {
29-
fill: #1B2029;
30+
vertical-align: middle;
31+
fill: currentColor;
3032
}
3133
3234
.emotion-0 use {
Lines changed: 5 additions & 5 deletions
Loading
Lines changed: 7 additions & 7 deletions
Loading

packages/icons/src/icon-product/components-inverse.svg

Lines changed: 4 additions & 4 deletions
Loading

0 commit comments

Comments
 (0)