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