UIIconBadge

Use icons from the Writer/Dashboard styleguide

Since: 7.1.0

NameTypeDefaultDescription

icon

string

Required - Name of the icon

size

string

""normal""

Combined width and height in px.

type

string

""default""

Type of look. default|primary|draft|pending|done|warning|alert|brand|dark|light|transparent|black|blur|blur-dark

tooltip

string | object

Combined width and height in px.

tootip.text

string

Required - Tooltip text

tootip.title

string

Tooltip title

tootip.parent

object

Position against specific parent element. Otherwise take closest.

tootip.verticalPosition

string

""top""

Vertical position for the tooltip reference to parent [top|center|bottom]

tootip.horizontalPosition

string

""center""

Horizontal position for the tooltip reference to parent [left|center|right]

tootip.arrowPosition

string

""bottom""

Arrow position on the tooltip [bottom|top|left|right]

Example

import {UIIconBadge} from 'writer'

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

    return el.append(
        $$(UIIconBadge, {
           icon: 'alarm-bell-bold',
           size: 'large',
           type: 'done',
           tooltip: 'I am a bell'
        })
    )
}

Last updated