forked from callstack/react-native-paper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIconButtonExample.tsx
39 lines (34 loc) · 971 Bytes
/
IconButtonExample.tsx
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
import * as React from 'react';
import { View, StyleSheet } from 'react-native';
import { IconButton, Colors, useTheme } from 'react-native-paper';
const ButtonExample = () => {
const { colors } = useTheme();
return (
<View style={[styles.container, { backgroundColor: colors.background }]}>
<IconButton icon="camera" size={24} onPress={() => {}} />
<IconButton
icon="lock"
size={24}
color={Colors.green500}
onPress={() => {}}
/>
<IconButton icon="camera" size={36} onPress={() => {}} />
<IconButton
icon="lock"
size={36}
onPress={() => {}}
style={{ backgroundColor: Colors.lightGreen200 }}
/>
<IconButton icon="heart" size={60} onPress={() => {}} />
</View>
);
};
ButtonExample.title = 'Icon Button';
const styles = StyleSheet.create({
container: {
flex: 1,
flexDirection: 'row',
padding: 8,
},
});
export default ButtonExample;