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

[sideNavItem] no need for justify-content: space-between #2297

Merged
merged 7 commits into from
Sep 6, 2019
Merged
Show file tree
Hide file tree
Changes from 6 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 @@ -7,6 +7,7 @@ No public interface changes since `13.8.0`.
- Added href prop to `EuiTab` and converted to TypeScript ([#2275](https://github.com/elastic/eui/pull/2275))
- Created `EuiInputPopover` component (formally) ([#2269](https://github.com/elastic/eui/pull/2269))
- Added docs for using [Elastic Charts](https://elastic.github.io/elastic-charts) with EUI ([#2209](https://github.com/elastic/eui/pull/2209))
- Adding icons to `SideNav` items will no longer right-align the item label ([#2297](https://github.com/elastic/eui/pull/2297))
spalger marked this conversation as resolved.
Show resolved Hide resolved

**Bug fixes**

Expand Down
8 changes: 6 additions & 2 deletions src-docs/src/views/side_nav/side_nav_complex.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,12 @@ export default class extends Component {
this.createItem('General'),
this.createItem('Timelion', {
items: [
this.createItem('Time stuff'),
this.createItem('Lion stuff'),
this.createItem('Time stuff', {
icon: <EuiIcon type="clock" />,
}),
this.createItem('Lion stuff', {
icon: <EuiIcon type="stats" />,
}),
],
}),
this.createItem('Visualizations'),
Expand Down
7 changes: 1 addition & 6 deletions src/components/side_nav/_side_nav_item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
.euiSideNavItemButton__content {
display: flex;
align-items: center;
justify-content: space-between;
}

.euiSideNavItemButton__icon {
Expand All @@ -53,6 +52,7 @@
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex-grow: 1;
}

/**
Expand All @@ -79,7 +79,6 @@

/**
* 1. Create padding around focus area without indenting the item itself.
* 2. Align icon and label to the left.
*/
& > .euiSideNavItemButton {
margin-bottom: $euiSizeS;
Expand All @@ -89,10 +88,6 @@
margin-left: -$euiSizeS; /* 1 */
width: calc(100% + #{$euiSizeS * 2}); /* 1 */

.euiSideNavItemButton__content {
justify-content: flex-start; /* 2 */
}

.euiSideNavItemButton__label {
@include euiTitle('xs');
}
Expand Down