Reference Source
import LinkButton from 'flarum/compone/LinkButton'
public class | source

LinkButton

Extends:

src/common/Component.js~ComponentButton → LinkButton

Direct Subclass:

AdminLinkButton

The LinkButton component defines a Button which links to a route.

Props

All of the props accepted by Button, plus:

  • active Whether or not the page that this button links to is currently active.
  • href The URL to link to. If the current URL m.route() matches this, the active prop will automatically be set to true.

Static Method Summary

Static Public Methods
public static

initProps(props: *)

public static

Determine whether a component with the given props is 'active'.

Method Summary

Public Methods
public

view(): *

Inherited Summary

From class Button
public

view(vnode: *): *

protected

getButtonContent(attrs: *, children: *): *

Get the template for the button's content.

Static Public Methods

public static initProps(props: *) source

Params:

NameTypeAttributeDescription
props *

public static isActive(props: Object): Boolean source

Determine whether a component with the given props is 'active'.

Params:

NameTypeAttributeDescription
props Object

Return:

Boolean

Public Methods

public view(): * source

Override:

Button#view

Return:

*