init button component

This commit is contained in:
moist-webDev 2023-05-25 00:32:58 -04:00
parent 4f7edf146d
commit 129df04ccd
1 changed files with 22 additions and 0 deletions

22
components/Button.tsx Normal file
View File

@ -0,0 +1,22 @@
import { StyleSheet, Text, View} from 'react-native';
export default function Button({ title='', theme={}, onPress, eStyle={} }:any){
return (
<Text onPress={onPress} style={{...style(theme).button, ...eStyle}}>{title}</Text>
)
}
const style = (theme:any) => {
return StyleSheet.create({
container: {
},
button: {
backgroundColor: theme.primary,
padding: 10,
alignContent: 'center',
color: theme.text,
margin: 10,
borderRadius: 5,
},
});
}