|
9 | 9 | <!-- layouts --> |
10 | 10 | <ScrollView height="100%" visibility="{{ selectedComponentType === 'layouts' ? 'visible' : 'collapsed' }}"> |
11 | 11 | <StackLayout> |
12 | | - <StackLayout |
| 12 | + <StackLayout |
13 | 13 | width="300" |
14 | 14 | height="100" |
15 | 15 | class="demo-component" |
16 | 16 | boxShadow="{{ appliedBoxShadow }}" |
17 | 17 | borderWidth="{{ borderWidth }}" |
18 | 18 | borderRadius="{{ borderRadius }}" |
19 | | - backgroundColor="{{ background }}" |
| 19 | + background="{{ background }}" |
20 | 20 | tap="{{ toggleAnimation }}" |
21 | 21 | > |
22 | 22 | <Label text="StackLayout"></Label> |
|
29 | 29 | boxShadow="{{ appliedBoxShadow }}" |
30 | 30 | borderWidth="{{ borderWidth }}" |
31 | 31 | borderRadius="{{ borderRadius }}" |
32 | | - backgroundColor="{{ background }}" |
| 32 | + background="{{ background }}" |
33 | 33 | tap="{{ toggleAnimation }}" |
34 | 34 | > |
35 | 35 | <Label text="GridLayout"></Label> |
|
42 | 42 | boxShadow="{{ appliedBoxShadow }}" |
43 | 43 | borderWidth="{{ borderWidth }}" |
44 | 44 | borderRadius="{{ borderRadius }}" |
45 | | - backgroundColor="{{ background }}" |
| 45 | + background="{{ background }}" |
46 | 46 | tap="{{ toggleAnimation }}" |
47 | 47 | > |
48 | 48 | <Label text="AbsoluteLayout"></Label> |
|
55 | 55 | boxShadow="{{ appliedBoxShadow }}" |
56 | 56 | borderWidth="{{ borderWidth }}" |
57 | 57 | borderRadius="{{ borderRadius }}" |
58 | | - backgroundColor="{{ background }}" |
| 58 | + background="{{ background }}" |
59 | 59 | tap="{{ toggleAnimation }}" |
60 | 60 | > |
61 | 61 | <Label text="DockLayout"></Label> |
|
68 | 68 | boxShadow="{{ appliedBoxShadow }}" |
69 | 69 | borderWidth="{{ borderWidth }}" |
70 | 70 | borderRadius="{{ borderRadius }}" |
71 | | - backgroundColor="{{ background }}" |
| 71 | + background="{{ background }}" |
72 | 72 | tap="{{ toggleAnimation }}" |
73 | 73 | > |
74 | 74 | <Label text="FlexboxLayout"></Label> |
75 | 75 | </FlexboxLayout> |
76 | 76 |
|
| 77 | + <GridLayout |
| 78 | + width="300" |
| 79 | + height="100" |
| 80 | + padding="4" |
| 81 | + boxShadow="{{ appliedBoxShadow }}" |
| 82 | + tap="{{ toggleAnimation }}" |
| 83 | + > |
| 84 | + <StackLayout |
| 85 | + borderWidth="4" |
| 86 | + borderRadius="20" |
| 87 | + backgroundColor="white" |
| 88 | + > |
| 89 | + <Label text="BorderRadius + BoxShadow on parent container"></Label> |
| 90 | + </StackLayout> |
| 91 | + </GridLayout> |
| 92 | + |
77 | 93 | </StackLayout> |
78 | 94 | </ScrollView> |
79 | 95 |
|
80 | 96 | <!-- labels --> |
81 | | - <GridLayout |
| 97 | + <GridLayout |
82 | 98 | rows="*" |
83 | 99 | height="100%" |
84 | 100 | visibility="{{ selectedComponentType === 'labels' ? 'visible' : 'collapsed' }}"> |
|
90 | 106 | boxShadow="{{ appliedBoxShadow }}" |
91 | 107 | borderWidth="{{ borderWidth }}" |
92 | 108 | borderRadius="{{ borderRadius }}" |
93 | | - backgroundColor="{{ background }}" |
| 109 | + background="{{ background }}" |
94 | 110 | tap="{{ toggleAnimation }}" |
95 | 111 | text="Label"></Label> |
96 | 112 |
|
97 | 113 | </GridLayout> |
98 | 114 |
|
99 | 115 | <!-- buttons --> |
100 | | - <GridLayout |
| 116 | + <GridLayout |
101 | 117 | rows="*" |
102 | 118 | height="100%" |
103 | 119 | visibility="{{ selectedComponentType === 'buttons' ? 'visible' : 'collapsed' }}"> |
104 | 120 |
|
105 | | - <Button |
| 121 | + <Button |
106 | 122 | horizontalAlignment="center" |
107 | 123 | verticalAlignment="center" |
108 | 124 | class="demo-component" |
109 | 125 | boxShadow="{{ appliedBoxShadow }}" |
110 | 126 | borderWidth="{{ borderWidth }}" |
111 | 127 | borderRadius="{{ borderRadius }}" |
112 | | - backgroundColor="{{ background }}" |
| 128 | + background="{{ background }}" |
113 | 129 | tap="{{ toggleAnimation }}" |
114 | 130 | text="button" |
115 | 131 | ></Button> |
116 | 132 |
|
117 | 133 | </GridLayout> |
118 | 134 |
|
| 135 | + <!-- images --> |
| 136 | + <GridLayout |
| 137 | + rows="*" |
| 138 | + height="100%" |
| 139 | + visibility="{{ selectedComponentType === 'images' ? 'visible' : 'collapsed' }}"> |
| 140 | + |
| 141 | + <ContentView width="100" |
| 142 | + height="100" |
| 143 | + horizontalAlignment="center" |
| 144 | + verticalAlignment="center" |
| 145 | + class="demo-component" |
| 146 | + boxShadow="{{ appliedBoxShadow }}" |
| 147 | + borderWidth="{{ borderWidth }}" |
| 148 | + borderRadius="{{ borderRadius }}" |
| 149 | + tap="{{ toggleAnimation }}"> |
| 150 | + <Image src="https://raw.githubusercontent.com/NativeScript/artwork/main/logo/export/NativeScript_Logo_Blue_Transparent.png"></Image> |
| 151 | + </ContentView> |
| 152 | + |
| 153 | + |
| 154 | + </GridLayout> |
| 155 | + |
119 | 156 | </StackLayout> |
120 | 157 |
|
121 | 158 | <GridLayout |
|
130 | 167 | <TextField |
131 | 168 | col="1" |
132 | 169 | placeholder="box-shadow" |
| 170 | + text="{{ boxShadow }}" |
133 | 171 | textChange="{{ textChange }}" |
134 | 172 | > |
135 | 173 | </TextField> |
|
146 | 184 | <Button text="Layouts" componentType="layouts" tap="{{ selectComponentType }}"></Button> |
147 | 185 | <Button text="Labels" componentType="labels" selectedAttr="{{ selectedComponentType }}" tap="{{ selectComponentType }}"></Button> |
148 | 186 | <Button text="Buttons" componentType="buttons" selectedAttr="{{ selectedComponentType == 'buttons' }}" tap="{{ selectComponentType }}"></Button> |
| 187 | + <Button text="Images" componentType="images" selectedAttr="{{ selectedComponentType == 'images' }}" tap="{{ selectComponentType }}"></Button> |
149 | 188 | </FlexboxLayout> |
150 | 189 |
|
151 | 190 | <Label text="Background"></Label> |
|
172 | 211 | <Button text="Scale" animationType="scale" tap="{{ selectAnimationType }}"></Button> |
173 | 212 | <Button text="Rotate" animationType="rotate" tap="{{ selectAnimationType }}"></Button> |
174 | 213 | </FlexboxLayout> |
175 | | - |
| 214 | + |
176 | 215 | </StackLayout> |
177 | 216 | </ScrollView> |
178 | 217 | </GridLayout> |
|
0 commit comments