forked from alibaba/rax
-
Notifications
You must be signed in to change notification settings - Fork 0
/
IconDemo.js
75 lines (66 loc) · 3.5 KB
/
IconDemo.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
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
import {createElement, Component} from 'rax';
import {
View,
Text,
Image,
Link,
TextInput,
Button,
Switch,
Video,
ScrollView,
TouchableWithoutFeedback} from 'rax-components';
import Icon, {createIconSet} from 'rax-icon';
let iconImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD8AAAAwCAYAAACmCaIKAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABZNJREFUeNrUWg9k3Fccv+QqhHCEIxzh5rgZmUynjE246YybUjKdK5UZJZXpZDY3q1an0wmp1E1rtMYmlWqlQqqVSaVamVRnlWplEqlGp3Gxk0itVo1fv9/6/rrn9f35vrt3ueuHD3e/e+/97vve9+97ryEIgkiVMAlcA14mLkXqDSi8gTHgEPBO8D9uAvuBTYZ+qeBlzAMHgFlgs+W9m0LTj1uBxUAPnJC4pu9AYMa/wESthW/QqH0r8CYwaVGcK8APgBvCs2bgAxpDh7PATyxjdwDb6D+kgS30PSG0eQT8iz7/DbwLvA5crkTtvw34yEp9P7O0fwpMK7RsL/AnMqunQWWYAxaAHeWo/ZjDi45Iff+0tP8ZuA2YB44D14PqYhTY6SL8uMPgh4V+2aA+gZq0X5Zzi8GWs8yAcVX4fNhzMFoA/gG8TUS7fkKfQ7/QDnwH2CP5AxFR4BD5jn02m28B3mfM6JTQJ+dhhR4Ch2ks12jQRCZoQz8n1KFTmjUMconygHCyHlQgMOYSGU8hzOas/wMmbcIjo8A+WuEiaQMKvdMxrpv+yCBwB02gD+Gj5O1NKHCE5/BdD6EpzBx9JTB9lnctYrvGCh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OGyobXxxLCgceSUH5yyt8chdIbhkwRo1PBEqXCSPU5fhD37ZPUOavZzHyTEcqqsuMCLApZ5gJNwiMhs8ww9gXCiX7vRZhWqFK3wmZGa3hTstNTpJiXT5pUSc552q4+Lpy5fV/D7aaMhzFQprci8uVnxqwP1viO7HgFq33J5Dwbqnjl3BeayIl1CJspHfQ8JeTyS5Rn4AbLdSp9jXdwnwkwAGXl2KVI+BEMAAAAAElFTkSuQmCC';
let iconfont = '//at.alicdn.com/t/font_lf2urtr9li110pb9.ttf';
let NewImage = createIconSet({
name1: '\uE9f2',
name2: '\uE65B',
name3: '\uE782',
name4: '\uE669',
name5: '\uE66D',
}, 'iconfont', iconfont);
class IconDemo extends Component {
render() {
return (
<View>
<View style={styles.container}>
<View style={styles.iconBox}>
<Icon style={styles.icon} source={{uri: iconImage}} />
</View>
</View>
<View style={styles.container}>
<Icon fontFamily="iconfont" source={{uri: iconfont, codePoint: '\uE603'}} />
</View>
<View style={styles.container}>
<View style={styles.iconBox3}>
<NewImage name={'name1'} />
<NewImage name={'name2'} />
<NewImage name={'name3'} />
<NewImage name={'name4'} />
<NewImage name={'name5'} />
</View>
</View>
</View>
);
}
}
let styles = {
container: {
padding: 20,
borderStyle: 'solid',
borderColor: '#dddddd',
borderWidth: 1,
marginLeft: 20,
marginRight: 20,
marginBottom: 10,
},
iconBox: {
backgroundColor: '#dddddd',
},
icon: {
width: 65,
height: 50,
}
};
export default IconDemo;