1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

A lot of updates

This commit is contained in:
Zhiyuan Zheng
2020-11-28 17:07:30 +01:00
parent 8200375c92
commit 735cc0b903
29 changed files with 940 additions and 1275 deletions

View File

@ -0,0 +1,37 @@
import React from 'react'
import { Pressable, StyleSheet, Text } from 'react-native'
import { Feather } from '@expo/vector-icons'
import constants from 'src/utils/styles/constants'
import { useTheme } from 'src/utils/styles/ThemeManager'
export interface Props {
onPressFunction: () => void
icon: string
text: string
}
const BottomSheetRow: React.FC<Props> = ({ onPressFunction, icon, text }) => {
const { theme } = useTheme()
return (
<Pressable onPress={() => onPressFunction()} style={styles.pressable}>
<Feather name={icon} color={theme.primary} size={constants.FONT_SIZE_L} />
<Text style={[styles.text, { color: theme.primary }]}>{text}</Text>
</Pressable>
)
}
const styles = StyleSheet.create({
pressable: {
flexDirection: 'row',
marginBottom: constants.SPACING_L
},
text: {
fontSize: constants.FONT_SIZE_M,
lineHeight: constants.FONT_SIZE_L,
marginLeft: constants.SPACING_S
}
})
export default BottomSheetRow