Expand all

IconButton

A wrapper for creating an icon button.

Constructor

new IconButton(options) #

Parameters:

Name Type Description
options Object

Configuration options

Source:

Properties

defaults #

Properties:

Name Type Description
defaults Object

Default options hash.

Properties:
Name Type Attributes Description
tagName string

The name of the tag in which the button is wrapped. Defaults to 'a' when href option present.

href string optional

value of href attribute, when set tagName will default to anchor tag

additionalClassNames string

Additional classes to be added to the button

title string

Tooltip text.

size string

Button size. Defaults to 'large'.

weight boolean

Button weight. Defaults to 'quiet'.

action boolean

Button action.

isIconOnly boolean

Whether button is an icon only button Defaults to true.

disabled boolean

should only be used with tagName button

base string

String used as a base for generating class names. Defaults to 'mf-icon'.

glyphPrefix string

Prefix for the icon class

icon string

Name of the icon.

rotation boolean

will rotate the icon by a certain number of degrees. Must be ±90, 0 or ±180 or will throw exception.

isSmall boolean

Whether the icon should be small.

Mixes in:
Source:

isTemplateMode #

Methods

getClassName() → {string} #

Return the full class name that is required for the icon to render

Source:

Returns:

Type
string
Return the full class name that is required for the icon to render

preRender() #