forked from bradleygore/nativescript-textinputlayout
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtextInputLayout.common.ts
More file actions
56 lines (47 loc) · 1.71 KB
/
textInputLayout.common.ts
File metadata and controls
56 lines (47 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
54
55
56
import { TextInputLayout as TextInputLayoutDefinition } from './textInputLayout';
import { Color } from "tns-core-modules/color";
import { View } from "tns-core-modules/ui/core/view";
import { Property } from 'tns-core-modules/ui/core/properties'
export { Property, Color };
export class TextInputLayout extends View implements TextInputLayoutDefinition {
// common
public hint: string;
public error: string;
//ANDROID ONLY
public hintAnimationEnabled?: boolean;
public hintTextAppearance?: string;
public errorTextAppearance?: string;
public counterEnabled?: boolean;
public errorEnabled?: boolean;
//IOS Only
public disabledColor?: Color;
public title?: string;
public tintColor?: Color;
public lineColor?: Color;
public selectedTintColor?: Color;
public selectedLineColor?: Color;
public selectedTitleColor?: Color;
public lineHeight?: number;
public selectedLineHeight?: number;
public errorColor?: Color;
public iconColor?: Color;
public selectedIconColor?: Color;
public iconFont?: string;
public iconText?: string;
public iconMarginBottom?: number;
public iconMarginLeft?: number;
public iconRotationDegrees?: number;
/* GETTERS/SETTERS for other property accessors implemented individually in ios/android components as they're so different */
}
/****** PROPERTIES ******/
export const errorProperty = new Property<TextInputLayout, string>({
name: "error",
affectsLayout: true
});
errorProperty.register(TextInputLayout);
// NOTE: This is 'placeholder' for ios
export const hintProperty = new Property<TextInputLayout, string>({
name: "hint",
affectsLayout: true
});
hintProperty.register(TextInputLayout);