forked from PolymerElements/paper-input
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpaper-input-error.d.ts
More file actions
53 lines (48 loc) · 1.71 KB
/
paper-input-error.d.ts
File metadata and controls
53 lines (48 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/**
* DO NOT EDIT
*
* This file was automatically generated by
* https://github.com/Polymer/gen-typescript-declarations
*
* To modify these typings, edit the source file(s):
* paper-input-error.html
*/
/// <reference path="../polymer/types/polymer.d.ts" />
/// <reference path="../paper-styles/default-theme.d.ts" />
/// <reference path="../paper-styles/typography.d.ts" />
/// <reference path="paper-input-addon-behavior.d.ts" />
/**
* `<paper-input-error>` is an error message for use with `<paper-input-container>`. The error is
* displayed when the `<paper-input-container>` is `invalid`.
*
* <paper-input-container>
* <input pattern="[0-9]*">
* <paper-input-error slot="add-on">Only numbers are allowed!</paper-input-error>
* </paper-input-container>
*
* ### Styling
*
* The following custom properties and mixins are available for styling:
*
* Custom property | Description | Default
* ----------------|-------------|----------
* `--paper-input-container-invalid-color` | The foreground color of the error | `--error-color`
* `--paper-input-error` | Mixin applied to the error | `{}`
*/
interface PaperInputErrorElement extends Polymer.Element, Polymer.PaperInputAddonBehavior {
/**
* True if the error is showing.
*/
readonly invalid: boolean|null|undefined;
/**
* This overrides the update function in PaperInputAddonBehavior.
*
* @param state inputElement: The input element.
* value: The input value.
* invalid: True if the input value is invalid.
*/
update(state: {inputElement?: Element|null, value?: string, invalid: boolean}): void;
}
interface HTMLElementTagNameMap {
"paper-input-error": PaperInputErrorElement;
}