Skip to content

Commit 0315954

Browse files
authored
fix select easy sidebar items (#64)
1 parent c04967d commit 0315954

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

projects/lib-workspace/src/app/app.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
</fs-nav-frame-toolbar>
2626

2727
<fs-nav-frame-sidebar>
28-
28+
2929
<fs-nav-frame-sidebar-item *ngFor="let route of navRoutes" routerLink="{{route.path}}">
30-
<mat-icon class="icon">{{route.icon}}</mat-icon>
31-
<span class="title">{{route.title}}</span>
30+
<i class="material-icons">{{route.icon}}</i>
31+
<span>{{route.title}}</span>
3232
</fs-nav-frame-sidebar-item>
3333

3434
</fs-nav-frame-sidebar>
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<button mat-button [routerLink]="routerLink" routerLinkActive="active-link">
2-
<ng-content select=".icon"></ng-content>
3-
<ng-content select=".title"></ng-content>
2+
<ng-content select="i"></ng-content>
3+
<ng-content select="span" class="nav-label"></ng-content>
44
</button>

projects/ng-mat-components/src/fs-nav-frame/components/fs-nav-frame-sidebar-item/fs-nav-frame-sidebar-item.component.scss

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,22 @@ fs-nav-frame-sidebar-item button {
1515
width: 100%;
1616
overflow: hidden;
1717
text-overflow: ellipsis;
18-
}
1918

20-
.icon {
21-
margin-left: 12px;
22-
}
19+
> i {
20+
margin-left: 12px;
21+
}
2322

24-
.title {
25-
margin-left: 1rem;
26-
white-space: nowrap;
27-
text-overflow: ellipsis;
23+
> span {
24+
margin-left: 1rem;
25+
white-space: nowrap;
26+
text-overflow: ellipsis;
27+
}
2828
}
2929
}
3030

31-
.sidebar.opened > fs-nav-frame-sidebar > fs-nav-frame-sidebar-item button .title {
31+
.sidebar.opened > fs-nav-frame-sidebar > fs-nav-frame-sidebar-item button .mdc-button__label > span {
3232
display: block;
3333
}
34-
.sidebar:not(.opened) > fs-nav-frame-sidebar > fs-nav-frame-sidebar-item button .title {
34+
.sidebar:not(.opened) > fs-nav-frame-sidebar > fs-nav-frame-sidebar-item button .mdc-button__label > span {
3535
display: none;
3636
}

0 commit comments

Comments
 (0)