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

LinkButton

Extends:

src/common/components/Button.js~Button → LinkButton

Direct Subclass:

ExtensionLinkButton

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

Attrs

All of the attrs 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.
  • force Whether the page should be fully rerendered. Defaults to true.

Static Method Summary

Static Public Methods
public static

initAttrs(attrs: *)

public static

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

Method Summary

Public Methods
public

view(vnode: *): *

Static Public Methods

public static initAttrs(attrs: *) source

Params:

NameTypeAttributeDescription
attrs *

public static isActive(attrs: Object): Boolean source

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

Params:

NameTypeAttributeDescription
attrs Object

Return:

Boolean

Public Methods

public view(vnode: *): * source

Params:

NameTypeAttributeDescription
vnode *

Return:

*