Skip to content

Commit 7dddeaa

Browse files
authored
chore: 优化 Icon 示例页面排版 (#170)
1 parent 331a0f1 commit 7dddeaa

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

example/examples/src/routes/Icon/index.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@ const styles = StyleSheet.create({
1010
display: 'flex',
1111
flexDirection: 'row',
1212
flexWrap: 'wrap',
13+
justifyContent: 'center',
1314
},
1415
item: {
15-
width: '50%',
16-
flexDirection: 'row',
16+
width: '31%',
1717
alignItems: 'center',
18-
justifyContent: 'flex-start',
19-
marginBottom: 5,
18+
justifyContent: 'center',
19+
margin: 3,
20+
paddingTop:10,
21+
paddingBottom:10,
22+
backgroundColor: '#fff',
23+
borderRadius:4
2024
},
2125
icon: {
2226
marginRight: 10,
@@ -258,8 +262,8 @@ const IconListView = ({keyName}: {keyName: IconsName}) => {
258262
return useMemo(
259263
() => (
260264
<View style={styles.item}>
261-
<Icon name={keyName} size={18} style={styles.icon} />
262-
<Text>{keyName}</Text>
265+
<Icon name={keyName} size={18} />
266+
<Text>{keyName}</Text>
263267
</View>
264268
),
265269
[keyName],

0 commit comments

Comments
 (0)