UIButtonGroup

Create a button with a context menu button component.

Since: 6.4.0

Example

import {UIButtonGroup} from 'writer'

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

    return el.append(
         $$(UIButtonGroup, {
             contextIcon: 'fa-plus',
             contextIconDisabled: false,
             label: Save,
             disabled: false,
             size: 'small',
             type: 'primary',
             contextClick: (evt) => {
                 // Do something
             },
             onClick: (evt) => {
                 // Do something
             }
         })

type

Available types

The UIButtonGroup.props.type has following variations:

By adding secondary to the type you down size it automatically. Good use with a "Cancel"-button

Type dark-mode should be added if button is on dark background