UIIconButton

Create a simple button, or a button with a context menu button component.

Since: 7.0.0 (6.2.0)

Example

import {UIIconButton} from 'writer'

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

    return el.append(
        $$(UIIconButton, {
            icon: 'pencil',
            onClick: () => {
                // Do something
            }
        })
    )
}

Example

import {UIIconButton} from 'writer'

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

    return el.append(
        $$(UIIconButton, {
            icon: 'bug',
            size: 'small',
            type:'primary',
            onClick: () => {
                // Do something
            }
        })
    )
}

type

Available types

The UIButton.props.type has following variations:

Type dark is used on buttons on dark background

Last updated