This repository was archived by the owner on Jan 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathcardview-common.ts
106 lines (88 loc) · 3.12 KB
/
cardview-common.ts
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
import { Color } from 'tns-core-modules/color';
import { ContentView, Property } from 'tns-core-modules/ui/content-view';
export { backgroundColorProperty, backgroundInternalProperty } from 'tns-core-modules/ui/core/view';
/**
* Contains the CardView class, which represents a card view component.
*/
export class CardViewCommon extends ContentView {
/**
* Gets the native [android widget](https://developer.android.com/reference/android/support/v7/widget/CardView.html) that represents the user interface for this component. Valid only when running on Android OS.
*/
android: any /* android.support.v7.widget.CardView */;
/**
* Gets the native [ios widget](UIView) that represents the user interface for this component. Valid only when running on iOS.
*/
ios: any /* UIView */;
/**
* Gets or set the radius of the card view.
*/
radius: number;
/**
* Gets or set the elevation of the card view. ** Valid only when running on Android OS **
*/
elevation: number;
/**
* Gets or set the shadow radius of the card view. ** Valid only when running on iOS **
*/
shadowRadius: number;
/**
* Set the shadow offset width of the card view. ** Valid only when running on iOS **
*/
shadowOffsetWidth: number;
/**
* Set the shadow offset height of the card view. ** Valid only when running on iOS **
*/
shadowOffsetHeight: number;
/**
* Set the shadow color of the card view. ** Valid only when running on iOS **
*/
shadowColor: string;
/**
* Set the shadow opacity of the card view. ** Valid only when running on iOS **
*/
shadowOpacity: number;
/**
* Gets or set the ripple setting.
*/
ripple: boolean;
}
export const radiusProperty = new Property<CardViewCommon, number>({
name: 'radius',
valueConverter: value => +value
});
radiusProperty.register(CardViewCommon);
export const elevationProperty = new Property<CardViewCommon, number>({
name: 'elevation',
valueConverter: value => +value
});
elevationProperty.register(CardViewCommon);
export const rippleProperty = new Property<CardViewCommon, boolean>({
name: 'ripple',
valueConverter: value => value === 'true'
});
rippleProperty.register(CardViewCommon);
export const shadowRadiusProperty = new Property<CardViewCommon, number>({
name: 'shadowRadius',
valueConverter: value => +value
});
shadowRadiusProperty.register(CardViewCommon);
export const shadowOffsetWidthProperty = new Property<CardViewCommon, number>({
name: 'shadowOffsetWidth',
valueConverter: value => +value
});
shadowOffsetWidthProperty.register(CardViewCommon);
export const shadowOffsetHeightProperty = new Property<CardViewCommon, number>({
name: 'shadowOffsetHeight',
valueConverter: value => +value
});
shadowOffsetHeightProperty.register(CardViewCommon);
export const shadowColorProperty = new Property<CardViewCommon, Color>({
name: 'shadowColor',
valueConverter: value => new Color(value)
});
shadowColorProperty.register(CardViewCommon);
export const shadowOpacityProperty = new Property<CardViewCommon, number>({
name: 'shadowOpacity',
valueConverter: value => +value
});
shadowOpacityProperty.register(CardViewCommon);