UNPKG

primeng

Version:

[![npm version](https://badge.fury.io/js/primeng.svg)](https://badge.fury.io/js/primeng) [![npm downloads](https://img.shields.io/npm/dm/primeng.svg)](https://www.npmjs.com/package/primeng) [![Actions CI](https://github.com/primefaces/primeng/workflows/No

123 lines (122 loc) 2.72 kB
import { TemplateRef } from '@angular/core'; /** * Defines valid templates in MeterGroup. * @group Templates */ export interface MeterGroupTemplates { /** * Custom label template. */ label(context: { /** * Current value of the component. */ $implicit?: MeterItem; /** * Total percent of the metergroup items. */ totalPercent?: number; /** * Array of sequential sum of values of metergroup items. */ percentages?: number; }): TemplateRef<any>; /** * Custom meter item template. */ meter(context: { /** * Current value of the component. */ $implicit?: MeterItem; /** * Current index of the meter item. */ index?: number; /** * Style class of the meter item */ class?: string; /** * Current orientation of the component. */ orientation?: string; /** * Current width of the meter item. */ size?: string; /** * Total percent of the metergroup items */ totalPercent?: number; }): TemplateRef<any>; /** * Custom start template. */ start(context: { /** * Current value of the component. */ $implicit?: MeterItem; /** * Total percent of the metergroup items. */ totalPercent?: number; /** * Array of sequential sum of values of metergroup items. */ percentages?: number; }): TemplateRef<any>; /** * Custom start template. */ end(context: { /** * Current value of the component. */ $implicit?: MeterItem; /** * Total percent of the metergroup items. */ totalPercent?: number; /** * Array of sequential sum of values of metergroup items. */ percentages?: number; }): TemplateRef<any>; /** * Custom icon template. */ icon(context: { /** * Current value of the component. */ $implicit?: MeterItem; /** * Style class of the icon. */ class?: string; }): TemplateRef<any>; } /** * Represents a meter item configuration. * @group Interface */ export interface MeterItem { /** * Label of the meter item. */ label?: string; /** * Value of the meter item. */ value?: number; /** * Color of the meter item. */ color?: string; /** * Icon of the meter item. */ icon?: string; }