UNPKG

carbon-components-angular

Version:
94 lines (90 loc) 3.16 kB
/** * * carbon-angular v0.0.0 | button.directive.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 { ButtonSize, ButtonType } from "./button.types"; import * as i0 from "@angular/core"; /** * A convenience directive for applying styling to a button. Get started with importing the module: * * ```typescript * import { ButtonModule } from 'carbon-components-angular'; * ``` * * Example: * * ```html * <button cdsButton>A button</button> * <button cdsButton="secondary">A secondary button</button> * ``` * * See the [vanilla carbon docs](http://www.carbondesignsystem.com/components/button/code) for more detail. * * [See demo](../../?path=/story/components-button--basic) */ export declare class Button { /** * @deprecated as of v5 - Use `cdsButton` input property instead */ set ibmButton(type: ButtonType); /** * Sets the button type * Accepts `ButtonType` or nothing (empty string which is equivalent to "primary") * Empty string has been added as an option for Angular 16+ to resolve type errors */ cdsButton: ButtonType | ""; /** * Specify the size of the button */ size: ButtonSize; /** * Set to `true` for a skeleton state button */ skeleton: boolean; /** * Set to `true` if the button contains only an icon * This should only be used for creating custom icon buttons, otherwise use * `<cds-icon-button></cds-icon-button>` component */ iconOnly: boolean; /** * Set to `true` for a "expressive" style button */ isExpressive: boolean; baseClass: boolean; get primaryButton(): boolean; get secondaryButton(): boolean; get tertiaryButton(): boolean; get ghostButton(): boolean; get dangerButton(): boolean; get dangerTertiary(): boolean; get dangerGhost(): boolean; /** * @todo remove `cds--btn--${size}` classes in v12 */ get smallSize(): boolean; get mediumSize(): boolean; get largeSize(): boolean; get extraLargeSize(): boolean; get twoExtraLargeSize(): boolean; get smallLayoutSize(): boolean; get mediumLayoutSize(): boolean; get largeLayoutSize(): boolean; get extraLargeLayoutSize(): boolean; get twoExtraLargeLayoutSize(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration<Button, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<Button, "[cdsButton], [ibmButton]", never, { "ibmButton": "ibmButton"; "cdsButton": "cdsButton"; "size": "size"; "skeleton": "skeleton"; "iconOnly": "iconOnly"; "isExpressive": "isExpressive"; }, {}, never, never, false>; }