Skip to content

Latest commit

 

History

History
54 lines (38 loc) · 1.39 KB

buttons-menu.component.md

File metadata and controls

54 lines (38 loc) · 1.39 KB
Added Status Last reviewed
v2.4.0
Active
2018-06-08

Buttons Menu Component

Displays buttons on a responsive menu.

adf-buttons-menu-desktop

Basic Usage

Place the buttons for the menu inside this component's HTML tags. They must use the following structure:

<adf-buttons-action-menu>
     <button mat-menu-item (click)="showSettings()">
        <mat-icon>settings</mat-icon><span>Settings</span>
    </button>
    <button mat-menu-item (click)="delete()">
        <mat-icon>delete</mat-icon><span>Delete</span>
    </button>
</adf-buttons-action-menu>  

Notice that the buttons have an icon and a label for the button inside a <span> tag. They also make use of the Angular material directive mat-menu-item.

<button mat-menu-item (click)="event()">
        <mat-icon> icon </mat-icon>
        <span> label </span>
</button>

Details

This component is fully responsive and it will display one of two different layouts depending on the screen size:

Desktop View

adf-buttons-menu-desktop

Mobile View

adf-buttons-menu-mobile

The component has a property called isMenuEmpty that you can access from code. If this is set to true then the component will not show an empty menu with no buttons defined.