2021-05-12 23:29:46 +00:00
|
|
|
/**
|
|
|
|
* 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`.
|
|
|
|
*/
|
2021-08-22 19:40:36 +00:00
|
|
|
export default class LinkButton extends Button<import("./Button").IButtonAttrs> {
|
2021-05-12 23:29:46 +00:00
|
|
|
static initAttrs(attrs: any): void;
|
|
|
|
/**
|
|
|
|
* Determine whether a component with the given attrs is 'active'.
|
|
|
|
*
|
2021-12-27 19:02:33 +00:00
|
|
|
* @param {object} attrs
|
|
|
|
* @return {boolean}
|
2021-05-12 23:29:46 +00:00
|
|
|
*/
|
2021-12-27 19:02:33 +00:00
|
|
|
static isActive(attrs: object): boolean;
|
2021-08-22 19:40:36 +00:00
|
|
|
constructor();
|
2021-05-12 23:29:46 +00:00
|
|
|
}
|
|
|
|
import Button from "./Button";
|