-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(module:menu): support unfolds/folds & add demo and api docs (#225)
* feat(module:menu): support unfolds/folds & add demo and api docs * fix(module:menu): revert index.less close #206
- Loading branch information
Showing
5 changed files
with
130 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
src/showcase/nz-demo-menu/nz-demo-menu-collapsed.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'nz-demo-menu-collapsed', | ||
template: ` | ||
<div style="width: 240px;"> | ||
<button nz-button [nzType]="'primary'" | ||
(click)="toggleCollapsed()" | ||
style="margin-bottom: 10px;"> | ||
<i class="anticon" | ||
[class.anticon-menu-unfold]="isCollapsed" | ||
[class.anticon-menu-fold]="!isCollapsed"> | ||
</i> | ||
</button> | ||
<ul nz-menu [nzMode]="'inline'" nzTheme='dark' [nzInlineCollapsed]="isCollapsed"> | ||
<li nz-menu-item> | ||
<span title> | ||
<i class="anticon anticon-mail"></i> | ||
<span>Navigation One</span> | ||
</span> | ||
</li> | ||
<li nz-submenu> | ||
<span title> | ||
<i class="anticon anticon-appstore"></i> | ||
<span>Navigation Two</span> | ||
</span> | ||
<ul> | ||
<li nz-menu-item>Option 5</li> | ||
<li nz-menu-item>Option 6</li> | ||
<li nz-submenu> | ||
<span title>Submenu</span> | ||
<ul> | ||
<li nz-menu-item>Option 7</li> | ||
<li nz-menu-item>Option 8</li> | ||
</ul> | ||
</li> | ||
</ul> | ||
</li> | ||
<li nz-submenu> | ||
<span title> | ||
<i class="anticon anticon-setting"></i> | ||
<span>Navigation Three</span> | ||
</span> | ||
<ul> | ||
<li nz-menu-item>Option 9</li> | ||
<li nz-menu-item>Option 10</li> | ||
<li nz-menu-item>Option 11</li> | ||
</ul> | ||
</li> | ||
</ul> | ||
</div> | ||
`, | ||
styles : [] | ||
}) | ||
export class NzDemoMenuCollapsedComponent implements OnInit { | ||
isCollapsed = false; | ||
|
||
constructor() { | ||
} | ||
|
||
ngOnInit() { | ||
} | ||
|
||
toggleCollapsed() { | ||
this.isCollapsed = !this.isCollapsed; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters