UIIconButtonMenu

Since: 7.1.0

NameTypeDefaultDescription

icon

string

Required - Name of the icon

size

string

""normal""

Size of button

tyoe

string

""default""

Type of button look. UIIconButton for variations

list

object

Required - Menu list object

list.header

string

Header for menu

list.type

string

Alternative plain for none selected presentation

list.width

number

If you really want to specified width of menu element. Not recommended

list.horizontalPosition

string

""right""

List position against button

list.items

Array.<object>

Required - Menu items

list.items.text

string

Required - Menu item text

list.items.selected

boolean

false

If menu item is selected

list.items.onClick

function

Required - onClick callback

Example

import {UIIconButtonMenu} from 'writer'

render($$) {
    const el = $$('div')

    return el.append(
        $$(UIIconButtonMenu, {
             icon: 'navigation-menu-horizontal-bold',
             list: {
               items: [
                 { name: 'Menu item 1', selected: true, onClick: () => { ... }},
                 { name: 'Menu item 2', onClick: () => { ... }}
               ]
             }
        })
    )
}