-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathDemo2.js
47 lines (42 loc) · 975 Bytes
/
Demo2.js
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
import React from 'react';
import {
View,
StyleSheet
} from 'react-native';
import {Badge} from '../index';
export class Demo2 extends React.PureComponent {
render() {
return (
<View style={styles.container}>
<Badge dot={false} count={9}>
<View style={styles.square}/>
</Badge>
<Badge dot={false} count={99}>
<View style={styles.square}/>
</Badge>
<Badge dot={false} count={100}>
<View style={styles.square}/>
</Badge>
<Badge dot={false} count={1000} overflowCount={999}>
<View style={styles.square}/>
</Badge>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flexDirection: 'row',
justifyContent: 'space-around',
alignItems: 'center',
paddingHorizontal: 15,
paddingTop: 18,
paddingBottom: 15
},
square: {
width: 30,
height: 30,
backgroundColor: '#CCC',
borderRadius: 4
}
});