From f4ea18b4364b6908eb57645dd54993d73d61b507 Mon Sep 17 00:00:00 2001 From: Ryan Keairns Date: Tue, 6 Nov 2018 13:54:21 -0600 Subject: [PATCH] Adds lab icon and updates beta badge style (#1291) * adds lab icon * update beta badge styles * change name to beaker --- CHANGELOG.md | 1 + src-docs/src/views/badge/beta_badge.js | 2 +- src-docs/src/views/icon/icons.js | 1 + src/components/badge/beta_badge/_beta_badge.scss | 6 ++---- src/components/badge/beta_badge/_mixins.scss | 1 + src/components/icon/assets/beaker.svg | 3 +++ src/components/icon/icon.js | 2 ++ src/components/icon/index.d.ts | 1 + 8 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 src/components/icon/assets/beaker.svg diff --git a/CHANGELOG.md b/CHANGELOG.md index 66e0ee132e7..de1a0196cf6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## [`master`](https://github.com/elastic/eui/tree/master) +- Added `beaker` icon to `EuiIcon` and updated the `EuiBetaBadge` styling ([#1291](https://github.com/elastic/eui/pull/1291/)) - Removed calls to deprecated `findDOMNode` ([#1285](https://github.com/elastic/eui/pull/1285)) **Breaking changes** diff --git a/src-docs/src/views/badge/beta_badge.js b/src-docs/src/views/badge/beta_badge.js index 502cf74cdba..7b16f38c465 100644 --- a/src-docs/src/views/badge/beta_badge.js +++ b/src-docs/src/views/badge/beta_badge.js @@ -12,7 +12,7 @@ export default () => (     - + diff --git a/src-docs/src/views/icon/icons.js b/src-docs/src/views/icon/icons.js index fd565c20ec5..f4c20e2ac79 100644 --- a/src-docs/src/views/icon/icons.js +++ b/src-docs/src/views/icon/icons.js @@ -17,6 +17,7 @@ const iconTypes = [ 'arrowRight', 'arrowUp', 'asterisk', + 'beaker', 'bolt', 'boxesHorizontal', 'boxesVertical', diff --git a/src/components/badge/beta_badge/_beta_badge.scss b/src/components/badge/beta_badge/_beta_badge.scss index 8a7494d7441..003cf808d6d 100644 --- a/src/components/badge/beta_badge/_beta_badge.scss +++ b/src/components/badge/beta_badge/_beta_badge.scss @@ -1,16 +1,14 @@ .euiBetaBadge { display: inline-block; - padding: 0 $euiSizeL; + padding: 0 $euiSize; border-radius: $euiSizeL; - background-color: $euiColorAccent; + box-shadow: inset 0 0 0 1px $euiBorderColor; vertical-align: super; // if displayed inline with text - @include euiSlightShadowHover($euiColorAccent); font-size: $euiFontSizeXS; font-weight: $euiFontWeightBold; text-transform: uppercase; letter-spacing: .05em; - color: chooseLightOrDarkText($euiColorAccent, $euiColorEmptyShade, $euiColorFullShade); line-height: $euiSizeL; text-align: center; white-space: nowrap; diff --git a/src/components/badge/beta_badge/_mixins.scss b/src/components/badge/beta_badge/_mixins.scss index d7e157e5a6e..36babff37d0 100644 --- a/src/components/badge/beta_badge/_mixins.scss +++ b/src/components/badge/beta_badge/_mixins.scss @@ -26,6 +26,7 @@ .#{$selector}__betaBadge { overflow: hidden; text-overflow: ellipsis; + background-color: $euiColorEmptyShade; } } } diff --git a/src/components/icon/assets/beaker.svg b/src/components/icon/assets/beaker.svg new file mode 100644 index 00000000000..3b166273a8d --- /dev/null +++ b/src/components/icon/assets/beaker.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/icon/icon.js b/src/components/icon/icon.js index ec6c802d7f0..a2e3295ef2d 100644 --- a/src/components/icon/icon.js +++ b/src/components/icon/icon.js @@ -14,6 +14,7 @@ import arrowRight from './assets/arrow_right.svg'; import arrowUp from './assets/arrow_up.svg'; import asterisk from './assets/asterisk.svg'; import auditbeatApp from './assets/app_auditbeat.svg'; +import beaker from './assets/beaker.svg'; import bolt from './assets/bolt.svg'; import boxesHorizontal from './assets/boxes_horizontal.svg'; import boxesVertical from './assets/boxes_vertical.svg'; @@ -250,6 +251,7 @@ const typeToIconMap = { arrowRight, arrowUp, asterisk, + beaker, bolt, boxesHorizontal, boxesVertical, diff --git a/src/components/icon/index.d.ts b/src/components/icon/index.d.ts index 7d7bb02d8a4..9079af0f79f 100644 --- a/src/components/icon/index.d.ts +++ b/src/components/icon/index.d.ts @@ -103,6 +103,7 @@ declare module '@elastic/eui' { | 'kqlOperand' | 'kqlSelector' | 'kqlValue' + | 'lab' | 'link' | 'list' | 'listAdd'