mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
* [ADF-2764] Added basic support for composite and external types * [ADF-2764] Added new type linker features and applied to core docs
2.1 KiB
2.1 KiB
Added, Status, Last reviewed
Added | Status | Last reviewed |
---|---|---|
v2.4.0 | Active | 2018-04-24 |
Buttons Menu Component
Displays buttons on a responsive menu.
Basic Usage
<adf-buttons-action-menu
[buttons]="buttons">
</adf-buttons-action-menu>
Class members
Properties
Name | Type | Default value | Description |
---|---|---|---|
buttons | MenuButton [] |
Array of buttons that defines the menu. |
Details
This component shows buttons on a responsive menu. The display of the menu changes to fit the screen size of the device:
Desktop view of the menu
Mobile view of the menu
The buttons
property contains an array of MenuButton
instances that define
the label and appearance of each button along with a handler function to
implement its action:
buttons: MenuButton[] = [];
setButtons() {
this.buttons = [
new MenuButton({
label: 'Settings',
icon: 'settings',
handler: this.settings.bind(this)
}),
new MenuButton({
label: 'Delete',
icon: 'delete',
handler: this.deleteItem.bind(this, this.reportId),
id: 'delete-button'
}),
new MenuButton({
label: 'Export',
icon: 'file_download',
handler: this.exportItem.bind(this),
id: 'export-button',
isVisible: this.isItemValid.bind(this)
}),
new MenuButton({
label: 'Save',
icon: 'save',
handler: this.saveItem.bind(this),
id: 'save-button',
isVisible: this.isItemValid.bind(this)
})
];