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

Made EuiKeyPadMenuItem beta badge smaller #2388

Merged
merged 4 commits into from
Sep 27, 2019
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
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;