carbon-components-angular
Version:
Next generation components
108 lines (104 loc) • 3.48 kB
TypeScript
/**
*
* carbon-angular v0.0.0 | icon-button.component.d.ts
*
* Copyright 2014, 2024 IBM
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { AfterViewInit, ElementRef, EventEmitter, Renderer2, TemplateRef } from "@angular/core";
import { BaseIconButton } from "./base-icon-button.component";
import { ButtonSize, ButtonType } from "./button.types";
import * as i0 from "@angular/core";
/**
* Get started with importing the module:
*
* ```typescript
* import { ButtonModule } from 'carbon-components-angular';
* ```
*
* [See demo](../../?path=/story/components-button-icon-button--basic)
*/
export declare class IconButton extends BaseIconButton implements AfterViewInit {
private renderer;
/**
* Pass global carbon classes to icon button
*/
set buttonNgClass(obj: {
[key: string]: boolean;
});
get buttonNgClass(): {
[key: string]: boolean;
};
/**
* @param obj: { [key: string]: string
* User can pass additional button attributes if component property does not already exist
* Key is the attribute name & value is the attribute value for the button
*/
set buttonAttributes(obj: {
[key: string]: string;
});
get buttonAttributes(): {
[key: string]: string;
};
static iconButtonCounter: number;
button: ElementRef;
/**
* Override id
*/
buttonId: string;
/**
* Sets the button type.
*/
kind: ButtonType;
/**
* Specify the size of the button.
*/
size: ButtonSize;
/**
* Set button type, `button` by default
*/
type: string;
/**
* Set to `true` to make button expressive
*/
isExpressive: boolean;
/**
* Set to `true` to disable button
*/
disabled: boolean;
/**
* The string or template content to be exposed by the tooltip.
*/
description: string | TemplateRef<any>;
/**
* Common button events
*/
click: EventEmitter<Event>;
focus: EventEmitter<Event>;
blur: EventEmitter<Event>;
/**
* Event to emit when click event is fired from tooltip
*/
tooltipClick: EventEmitter<Event>;
private classList;
private attributeList;
constructor(renderer: Renderer2);
ngAfterViewInit(): void;
/**
* Stop propogation of click event
* Else double fires (click) event
*/
emitClickEvent(event: any, element?: "tooltip" | "button"): void;
static ɵfac: i0.ɵɵFactoryDeclaration<IconButton, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<IconButton, "cds-icon-button, ibm-icon-button", never, { "buttonNgClass": "buttonNgClass"; "buttonAttributes": "buttonAttributes"; "buttonId": "buttonId"; "kind": "kind"; "size": "size"; "type": "type"; "isExpressive": "isExpressive"; "disabled": "disabled"; "description": "description"; }, { "click": "click"; "focus": "focus"; "blur": "blur"; "tooltipClick": "tooltipClick"; }, never, ["*"], false>;
}