Skip to content

Commit

Permalink
Made EuiKeyPadMenuItem beta badge smaller (#2388)
Browse files Browse the repository at this point in the history
  • Loading branch information
cchaos authored Sep 27, 2019
1 parent 12abe20 commit e961a3a
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 17 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- Migrate `EuiEmptyPrompt`and `EuiCard` to TS ([#2387](https://github.com/elastic/eui/pull/2387))
- Added Lens app `lensApp` icon ([#2389](https://github.com/elastic/eui/pull/2389))
- Made `EuiKeyPadMenuItem` beta badge smaller ([#2388](https://github.com/elastic/eui/pull/2388))

## [`14.3.0`](https://github.com/elastic/eui/tree/v14.3.0)

Expand Down
16 changes: 8 additions & 8 deletions src/components/badge/beta_badge/_beta_badge.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
white-space: nowrap;

cursor: default;
}

// When it's just an icon, make it a circle
&.euiBetaBadge--iconOnly {
padding: 0;
width: $euiSizeL;
// When it's just an icon, make it a circle
.euiBetaBadge--iconOnly {
padding: 0;
width: $euiSizeL;

.euiBetaBadge__icon {
position: relative;
margin-top: -1px;
}
.euiBetaBadge__icon {
position: relative;
margin-top: -1px;
}
}
2 changes: 1 addition & 1 deletion src/components/key_pad_menu/_index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Key padis a phone like nav comprised of an svg icon and a title.

$euiKeyPadMenuSize: $euiSize * 6;
@import 'variables';

@import 'key_pad_menu';
17 changes: 9 additions & 8 deletions src/components/key_pad_menu/_key_pad_menu.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/**
* Dial menu is a phone like dial comprised of an svg icon and a title.
*/

/**
* 1. Default to grid of 3
*/
Expand Down Expand Up @@ -73,14 +69,13 @@

.euiKeyPadMenuItem__betaBadgeWrapper {
position: absolute;
top: $euiSizeS;
top: $euiSizeXS;
right: $euiSizeS;
z-index: 3;

// sass-lint:disable-block nesting-depth
.euiKeyPadMenuItem__betaBadge:not(.euiBetaBadge--iconOnly) {
width: $euiSizeL;
padding: 0 (($euiSizeL - $euiFontSizeXS) / 1.5); /* 2 */
padding: 0 ($euiSizeM / 2); /* 2 */
overflow: hidden; /* 2 */
letter-spacing: 3rem; /* 2 */
}
Expand All @@ -89,9 +84,15 @@
}

.euiKeyPadMenuItem__betaBadge {
color: $euiTextColor;
@include size($euiKeyPadMenuItemBetaBadgeSize);
line-height: $euiKeyPadMenuItemBetaBadgeSize;
color: $euiColorFullShade;
background-color: tintOrShade($euiColorLightShade, 50%, 0%);
box-shadow: none;

.euiBetaBadge__icon {
@include size($euiSizeM);
}
}

.euiKeyPadMenuItem__icon {
Expand Down
2 changes: 2 additions & 0 deletions src/components/key_pad_menu/_variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
$euiKeyPadMenuSize: $euiSize * 6 !default;
$euiKeyPadMenuItemBetaBadgeSize: $euiSize + $euiSizeXS !default;

0 comments on commit e961a3a

Please sign in to comment.