UNPKG

igniteui-angular

Version:

Ignite UI for Angular is a dependency-free Angular toolkit for building modern web apps

52 lines (51 loc) 1.71 kB
import { InjectionToken, EventEmitter, DoCheck } from '@angular/core'; /** * Defines the posible values of the components' display density. */ export declare const enum DisplayDensity { comfortable = "comfortable", cosy = "cosy", compact = "compact" } /** * Describes the object used to configure the DisplayDensity in Angular DI. */ export interface IDisplayDensityOptions { displayDensity: DisplayDensity; } export interface IDensityChangedEventArgs { oldDensity: DisplayDensity; newDensity: DisplayDensity; } /** * Defines the DisplayDensity DI token. */ export declare const DisplayDensityToken: InjectionToken<IDisplayDensityOptions>; /** * Base class containing all logic required for implementing DisplayDensity. */ export declare class DisplayDensityBase implements DoCheck { protected displayDensityOptions: IDisplayDensityOptions; protected _displayDensity: DisplayDensity; /** * Returns the theme of the component. * The default theme is `comfortable`. * Available options are `comfortable`, `cosy`, `compact`. * ```typescript * let componentTheme = this.component.displayDensity; * ``` */ /** * Sets the theme of the component. */ displayDensity: DisplayDensity | string; onDensityChanged: EventEmitter<IDensityChangedEventArgs>; protected oldDisplayDensityOptions: IDisplayDensityOptions; constructor(displayDensityOptions: IDisplayDensityOptions); ngDoCheck(): void; /** * Given a style class of a component/element returns the modified version of it based * on the current display density. */ protected getComponentDensityClass(baseStyleClass: string): string; }