feat: Add expense screen
This commit is contained in:
parent
e1efed5b21
commit
36679279c1
18 changed files with 459 additions and 57 deletions
32
components/common/RoundedButton.tsx
Normal file
32
components/common/RoundedButton.tsx
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import { StyleSheet, Text, View, ViewProps, TouchableOpacity } from 'react-native'
|
||||
import React from 'react'
|
||||
import { SIZES } from '../../constants/theme';
|
||||
|
||||
interface RoundedButtonProps extends ViewProps{
|
||||
onPress?: ()=> void | undefined;
|
||||
color: string;
|
||||
}
|
||||
|
||||
const RoundedButton: React.FC<RoundedButtonProps> = (props: RoundedButtonProps) => {
|
||||
const {onPress, color, style, ...restProps} = props;
|
||||
return (
|
||||
<TouchableOpacity onPress={onPress}>
|
||||
<View style={[{backgroundColor: color}, styles.btn, style]}{...restProps}>
|
||||
{restProps.children}
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
)
|
||||
}
|
||||
|
||||
export default RoundedButton
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
btn:{
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
borderRadius: 80
|
||||
},
|
||||
text: {
|
||||
fontSize: SIZES.normal
|
||||
}
|
||||
})
|
||||
Reference in a new issue