forked from callstack/react-native-paper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIconButtonExample.js
43 lines (35 loc) · 882 Bytes
/
IconButtonExample.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
/* @flow */
import * as React from 'react';
import { View, StyleSheet } from 'react-native';
import { IconButton, Colors, withTheme, type Theme } from 'react-native-paper';
type Props = {
theme: Theme,
};
type State = {
loading: boolean,
};
class ButtonExample extends React.Component<Props, State> {
static title = 'Icon Button';
render() {
const { colors } = this.props.theme;
return (
<View style={[styles.container, { backgroundColor: colors.background }]}>
<IconButton icon="add-a-photo" size={24} onPress={() => {}} />
<IconButton
icon="https"
size={24}
color={Colors.green500}
onPress={() => {}}
/>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
flexDirection: 'row',
padding: 8,
},
});
export default withTheme(ButtonExample);