import {ComponentConfig, Component} from './component';
import {DOM} from '../dom';
import {EventDispatcher, Event, NoArgs} from '../eventdispatcher';
import { LocalizableText, i18n } from '../localization/i18n';
/**
* Configuration interface for a {@link Label} component.
*/
export interface LabelConfig extends ComponentConfig {
/**
* The text as string or localize callback on the label.
*/
text?: LocalizableText;
/**
* WCAG20 standard: Associate label to form control.
*/
for?: string;
}
/**
* A simple text label.
*
* DOM example:
*
* ...some text...
*
*/
export class Label extends Component {
private text: LocalizableText;
private labelEvents = {
onClick: new EventDispatcher