@blox/material
Version:
Material Components for Angular
61 lines (60 loc) • 2.57 kB
TypeScript
import { AfterContentInit, ElementRef, OnDestroy, Renderer2 } from '@angular/core';
import { AbstractMdcRipple } from '../ripple/abstract.mdc.ripple';
import { MdcEventRegistry } from '../../utils/mdc.event.registry';
/**
* Use this directive for adding an icon to an <code>mdcButton</code>. This directive can be
* added to font-style icons (such as <a href="https://material.io/icons/" target="_blank">material icons</a>
* from Google fonts), or with <code>svg</code> elements for svg based icons.
*/
export declare class MdcButtonIconDirective {
}
/**
* Directive for the label of an <code>mdcButton</code>. Must be a direct child
* of <code>mdcButton</code>.
*/
export declare class MdcButtonLabelDirective {
}
/**
* Material design button. Anchors can also be styled as buttons with this directive.
* Defaults to a button that is flushed with the surface.
* Use the input modifiers to alter the styling, or create your own style
* based on the provided sass-mixins.
*
* For buttons with a trailing icon, you must put the label inside an `mdcButtonLabel`
* directive. For all other buttons it is also recommnded to put the label inside
* an `mdcButtonLabel`, because future version of material-components-web may make
* it's use mandatory.
*
* A ripple (and the required DOM elements for the ripple) will be added automatically.
*/
export declare class MdcButtonDirective extends AbstractMdcRipple implements AfterContentInit, OnDestroy {
_elm: ElementRef;
private _raised;
private _unelevated;
private _outlined;
constructor(_elm: ElementRef, renderer: Renderer2, registry: MdcEventRegistry, doc: any);
ngAfterContentInit(): void;
ngOnDestroy(): void;
/**
* When this input is defined and does not have value false, the button will be elevated
* upon the surface.
*/
get raised(): boolean;
set raised(val: boolean);
static ngAcceptInputType_raised: boolean | '';
/**
* When this input is defined and does not have value false, the button will be styled
* flush with the surface and have a visible border.
*/
get outlined(): boolean;
set outlined(val: boolean);
static ngAcceptInputType_outlined: boolean | '';
/**
* Set this property to a non false value for a contained button
* flush with the surface.
*/
get unelevated(): boolean;
set unelevated(val: boolean);
static ngAcceptInputType_unelevated: boolean | '';
}
export declare const BUTTON_DIRECTIVES: (typeof MdcButtonLabelDirective | typeof MdcButtonDirective)[];