UNPKG

origami-zen

Version:

Collection of reusable web components. Built for Origami CMS.

31 lines (30 loc) 933 B
import { LitElement } from '@polymer/lit-element'; import { ValidationErrors } from '../../lib/FormValidator'; import { Field } from '../../lib/FormValidator/FormFieldTypes'; import { TemplateResult } from 'lit-html'; export interface props { field?: Field; name?: string; value?: any; error?: ValidationErrors; rowwidth?: 'half'; hidden: boolean; disabled: boolean; } export default class FormRow extends LitElement implements props { field?: Field; name?: string; value?: any; error?: ValidationErrors; rowwidth?: 'half'; hidden: boolean; disabled: boolean; static _boundAttributes: string[]; constructor(); _render({error, field, value}: props): TemplateResult; focus(): void; private _handleChange(e); private submit(); _renderField(f: Field, value: any): TemplateResult | undefined; private _handleKeyUp(e); }