Skip to content

Commit 7b5970f

Browse files
committed
Add examples with custom size number usage
1 parent 4153448 commit 7b5970f

File tree

1 file changed

+40
-18
lines changed

1 file changed

+40
-18
lines changed

Examples/UIExplorer/js/ActivityIndicatorExample.js

Lines changed: 40 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const ToggleAnimatingActivityIndicator = React.createClass({
5656
<ActivityIndicator
5757
animating={this.state.animating}
5858
style={[styles.centering, {height: 80}]}
59-
size="large"
59+
size='large'
6060
/>
6161
);
6262
}
@@ -74,7 +74,7 @@ exports.examples = [
7474
return (
7575
<ActivityIndicator
7676
style={[styles.centering, styles.gray]}
77-
color="white"
77+
color='white'
7878
/>
7979
);
8080
}
@@ -99,10 +99,10 @@ exports.examples = [
9999
render() {
100100
return (
101101
<View style={styles.horizontal}>
102-
<ActivityIndicator color="#0000ff" />
103-
<ActivityIndicator color="#aa00aa" />
104-
<ActivityIndicator color="#aa3300" />
105-
<ActivityIndicator color="#00aa00" />
102+
<ActivityIndicator color='#0000ff' />
103+
<ActivityIndicator color='#aa00aa' />
104+
<ActivityIndicator color='#aa3300' />
105+
<ActivityIndicator color='#00aa00' />
106106
</View>
107107
);
108108
}
@@ -113,8 +113,8 @@ exports.examples = [
113113
return (
114114
<ActivityIndicator
115115
style={[styles.centering, styles.gray]}
116-
color="white"
117-
size="large"
116+
color='white'
117+
size='large'
118118
/>
119119
);
120120
}
@@ -125,20 +125,20 @@ exports.examples = [
125125
return (
126126
<View style={styles.horizontal}>
127127
<ActivityIndicator
128-
size="large"
129-
color="#0000ff"
128+
size='large'
129+
color='#0000ff'
130130
/>
131131
<ActivityIndicator
132-
size="large"
133-
color="#aa00aa"
132+
size='large'
133+
color='#aa00aa'
134134
/>
135135
<ActivityIndicator
136-
size="large"
137-
color="#aa3300"
136+
size='large'
137+
color='#aa3300'
138138
/>
139139
<ActivityIndicator
140-
size="large"
141-
color="#00aa00"
140+
size='large'
141+
color='#00aa00'
142142
/>
143143
</View>
144144
);
@@ -151,12 +151,34 @@ exports.examples = [
151151
}
152152
},
153153
{
154-
title: 'Custom size',
154+
title: 'Custom size (size: 48)',
155+
render() {
156+
return (
157+
<ActivityIndicator
158+
style={styles.centering}
159+
size={48}
160+
/>
161+
);
162+
}
163+
},
164+
{
165+
title: 'Custom size (size: 56)',
166+
render() {
167+
return (
168+
<ActivityIndicator
169+
style={styles.centering}
170+
size={56}
171+
/>
172+
);
173+
}
174+
},
175+
{
176+
title: 'Custom size (size: 30, scale transform: 1.5)',
155177
render() {
156178
return (
157179
<ActivityIndicator
158180
style={[styles.centering, {transform: [{scale: 1.5}]}]}
159-
size="large"
181+
size={30}
160182
/>
161183
);
162184
}

0 commit comments

Comments
 (0)