carbon-components-angular
Version:
Next generation components
91 lines (87 loc) • 2.94 kB
TypeScript
/**
*
* carbon-angular v0.0.0 | overflow-menu-option.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 { ElementRef, EventEmitter, AfterViewInit } from "@angular/core";
import * as i0 from "@angular/core";
/**
* Available HTML anchor targets
*/
export declare enum Target {
self = "_self",
blank = "_blank",
parent = "_parent",
top = "_top"
}
/**
* `OverflowMenuOption` represents a single option in an overflow menu
*
* Presently it has three possible states - normal, disabled, and danger:
* ```
* <cds-overflow-menu-option>Simple option</cds-overflow-menu-option>
* <cds-overflow-menu-option disabled="true">Disabled</cds-overflow-menu-option>
* <cds-overflow-menu-option type="danger">Danger option</cds-overflow-menu-option>
* ```
*
* For content that expands beyond the overflow menu `OverflowMenuOption` automatically adds a title attribute.
*/
export declare class OverflowMenuOption implements AfterViewInit {
protected elementRef: ElementRef;
optionClass: boolean;
role: string;
get isDanger(): Boolean;
get isDisabled(): Boolean;
/**
* Set to `true` to display a dividing line above this option
*/
divider: boolean;
/**
* toggles between `normal` and `danger` states
*/
type: "normal" | "danger";
/**
* disable/enable interactions
*/
disabled: boolean;
/**
* If it's an anchor, this is its location
*/
href: string;
/**
* Allows to add a target to the anchor
*/
set target(value: Target);
/**
* Apply a custom class to the inner button/anchor
*/
innerClass: string;
get target(): Target;
/**
* rel only returns its value if target is defined
*/
get rel(): string;
selected: EventEmitter<any>;
tabIndex: number;
title: any;
protected _target: Target;
constructor(elementRef: ElementRef);
onClick(): void;
onFocus(): void;
onBlur(): void;
ngAfterViewInit(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<OverflowMenuOption, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<OverflowMenuOption, "cds-overflow-menu-option, ibm-overflow-menu-option", never, { "divider": "divider"; "type": "type"; "disabled": "disabled"; "href": "href"; "target": "target"; "innerClass": "innerClass"; }, { "selected": "selected"; }, never, ["*"], false>;
}