[develop]: Add ration in Icon class and use it in sidebar.
This commit is contained in:
parent
35276059f1
commit
9ae1ee928a
|
@ -40,7 +40,7 @@
|
||||||
<a [routerLink]="getItemRoute(item)" [title]="item.title" (click)="item.items.length === 0?closeOffcanvas():null"
|
<a [routerLink]="getItemRoute(item)" [title]="item.title" (click)="item.items.length === 0?closeOffcanvas():null"
|
||||||
[queryParams]="item.route?item.params:null" [queryParamsHandling]="item.route?queryParamsHandling:null" class="uk-flex uk-flex-middle">
|
[queryParams]="item.route?item.params:null" [queryParamsHandling]="item.route?queryParamsHandling:null" class="uk-flex uk-flex-middle">
|
||||||
<div *ngIf="item.icon && (item.icon.svg || item.icon.name)" class="uk-width-auto">
|
<div *ngIf="item.icon && (item.icon.svg || item.icon.name)" class="uk-width-auto">
|
||||||
<icon class="menu-icon" [customClass]="item.icon.class" [name]="item.icon.name" [ratio]="item.icon.svg?1:0.9" [svg]="item.icon.svg" [flex]="true"></icon>
|
<icon class="menu-icon" [customClass]="item.icon.class" [name]="item.icon.name" [ratio]="item.icon.ratio?item.icon.ratio:0.9" [svg]="item.icon.svg" [flex]="true"></icon>
|
||||||
</div>
|
</div>
|
||||||
<span [class.hide-on-close]="item.icon" class="uk-width-expand@l uk-text-truncate uk-margin-small-left">{{item.title}}</span>
|
<span [class.hide-on-close]="item.icon" class="uk-width-expand@l uk-text-truncate uk-margin-small-left">{{item.title}}</span>
|
||||||
<span *ngIf="item.items.length > 0" class="uk-nav-parent-icon hide-on-close"></span>
|
<span *ngIf="item.items.length > 0" class="uk-nav-parent-icon hide-on-close"></span>
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
export interface Icon {
|
export interface Icon {
|
||||||
name?: string,
|
name?: string,
|
||||||
svg?: string,
|
svg?: string,
|
||||||
class?: string
|
class?: string,
|
||||||
|
ratio?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export class MenuItem {
|
export class MenuItem {
|
||||||
|
|
Loading…
Reference in New Issue