-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(material-experimental/menubar): update the dev-app to include a …
…fake mat-menu Fake mat-menu and mat-menu-item in the dev-app in order to aid in development of mat-menubar. Once mat-menu extends CdkMenu, the fakses should be removed.
- Loading branch information
Showing
5 changed files
with
110 additions
and
8 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,27 @@ | ||
<mat-menubar> | ||
<mat-menubar-item>File</mat-menubar-item> | ||
<mat-menubar-item>Edit</mat-menubar-item> | ||
<mat-menubar-item>View</mat-menubar-item> | ||
<mat-menubar-item cdkMenuItem [cdkMenuTriggerFor]="file">File</mat-menubar-item> | ||
<mat-menubar-item cdkMenuItem [cdkMenuTriggerFor]="edit">Edit</mat-menubar-item> | ||
<mat-menubar-item cdkMenuItem [cdkMenuTriggerFor]="view">View</mat-menubar-item> | ||
</mat-menubar> | ||
|
||
<ng-template cdkMenuPanel #file="cdkMenuPanel"> | ||
<demo-menu [cdkMenuPanel]="file"> | ||
<demo-menu-item>Share</demo-menu-item> | ||
<demo-menu-item>Open</demo-menu-item> | ||
<demo-menu-item>Make a Copy</demo-menu-item> | ||
</demo-menu> | ||
</ng-template> | ||
|
||
<ng-template cdkMenuPanel #edit="cdkMenuPanel"> | ||
<demo-menu [cdkMenuPanel]="edit"> | ||
<demo-menu-item>Undo</demo-menu-item> | ||
<demo-menu-item>Redo</demo-menu-item> | ||
</demo-menu> | ||
</ng-template> | ||
|
||
<ng-template cdkMenuPanel #view="cdkMenuPanel"> | ||
<demo-menu [cdkMenuPanel]="view"> | ||
<demo-menu-item>Show Ruler</demo-menu-item> | ||
<demo-menu-item>Show Document Outline</demo-menu-item> | ||
</demo-menu> | ||
</ng-template> |
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,29 @@ | ||
.mat-menu { | ||
display: flex; | ||
flex-direction: column; | ||
|
||
max-height: 808px; | ||
min-height: 64px; | ||
max-width: 280px; | ||
min-width: 112px; | ||
|
||
padding: 8px 0; | ||
|
||
border-radius: 4px; | ||
box-shadow: #0003 0 2px 4px -1px, #00000024 0 4px 5px 0, #0000001f 0 1px 10px 0; | ||
|
||
cursor: pointer; | ||
|
||
&[aria-orientation='horizontal'] { | ||
flex-direction: row; | ||
} | ||
} | ||
|
||
.mat-menu-item { | ||
display: block; | ||
padding: 16px; | ||
user-select: none; | ||
-webkit-user-select: none; | ||
-moz-user-select: none; | ||
-ms-user-select: none; | ||
} |
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