UNPKG

carbon-components-angular

Version:
62 lines (58 loc) 2.25 kB
/** * * carbon-angular v0.0.0 | content-switcher.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 { QueryList, EventEmitter, AfterViewInit, ElementRef } from "@angular/core"; import { ContentSwitcherOption } from "./content-switcher-option.directive"; import * as i0 from "@angular/core"; /** * The content switcher can be used for toggling between distinct options. * Similar to tabs, but without an associated content panel. * * Get started with importing the module: * * ```typescript * import { ContentSwitcherModule } from 'carbon-components-angular'; * ``` * * ```html * <cds-content-switcher (selected)="selected($event)"> * <button cdsContentOption>First section</button> * <button cdsContentOption>Second section</button> * <button cdsContentOption>Third section</button> * </cds-content-switcher> * ``` * * [See demo](../../?path=/story/components-content-switcher--basic) */ export declare class ContentSwitcher implements AfterViewInit { protected elementRef: ElementRef; ariaLabel: string; /** * Set content switcher size */ size: "sm" | "md" | "lg"; /** * Emits the activated `ContentSwitcherOption` */ selected: EventEmitter<ContentSwitcherOption>; options: QueryList<ContentSwitcherOption>; constructor(elementRef: ElementRef); ngAfterViewInit(): void; hostkeys(event: KeyboardEvent): void; static ɵfac: i0.ɵɵFactoryDeclaration<ContentSwitcher, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ContentSwitcher, "cds-content-switcher, ibm-content-switcher", never, { "ariaLabel": "ariaLabel"; "size": "size"; }, { "selected": "selected"; }, ["options"], ["*"], false>; }