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

LinkButton

Extends:

flarum/components/Button~Button → LinkButton

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(): *

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

Return:

*