UIIconButton

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

Properties

Name

Type

Default

Description

icon

string

Required - Font awesome class to use as an inline icon prefixed to the button text

disabled

boolean

false

Set to true to disable button

size

string

"default"

Size of button. Variants: large|small

onClick

function

Callback for when the button is clicked

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',
            onClick: () => {
                // Do something
            }
        })
    )
}

Last updated