UNPKG

govuk-angular

Version:

Angular components port of govuk-frontend nunjucks macros.

56 lines (55 loc) 2.02 kB
import { ElementRef, EventEmitter } from '@angular/core'; import { Fieldset, Legend } from '../fieldset/fieldset'; import { GovUKDataCapture } from '../data-capture.component'; import { Hint } from '../hint/hint'; import { ErrorMessage } from '../error/error-message.model'; import { LinkAction } from '../input/link-action'; import * as i0 from "@angular/core"; /** * * ```javascript * <govuk-date-input * [id]="'start-date'" * [legend]="{ * text: 'Start Date', * classes: 'govuk-fieldset__legend--s' * }" * [hint]="{ text: 'For example, 27 03 2020' }" * [model]="startDateInput" * [linkAction]="{ text:'Use today\'s date', action: setStartDateToToday, id: 'use-todays-date' } " > * </govuk-date-input> *``` */ export declare class GovUKDateInputComponent implements GovUKDataCapture<DateInput> { el: ElementRef; id: string; name: string; classes: string; describeBy?: string; hint: Hint; /** { text: string; classes: string; } */ errorMessage: ErrorMessage; /** * ``` javascript * export interface DateInput { * day: number | string; * month: number | string; * year: number | string; * } *``` */ model: DateInput; modelChange: EventEmitter<any>; fieldset: Fieldset; legend: Legend; /** Can be use to set the input value on clicking the link */ linkAction: LinkAction; constructor(el: ElementRef); static ɵfac: i0.ɵɵFactoryDeclaration<GovUKDateInputComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<GovUKDateInputComponent, "govuk-date-input", never, { "id": "id"; "name": "name"; "classes": "classes"; "describeBy": "describeBy"; "hint": "hint"; "errorMessage": "errorMessage"; "model": "model"; "fieldset": "fieldset"; "legend": "legend"; "linkAction": "linkAction"; }, { "modelChange": "modelChange"; }, never, never>; } export interface DateInput { day: number | string; month: number | string; year: number | string; }