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

iOS almost working

This commit is contained in:
Zhiyuan Zheng
2021-01-30 01:29:15 +01:00
parent 9c36052c2a
commit 247f7a7982
126 changed files with 1829 additions and 1341 deletions

View File

@ -7,11 +7,17 @@ import { Pressable, StyleSheet, Text } from 'react-native'
export interface Props {
type?: 'icon' | 'text'
content?: string
native?: boolean
onPress: () => void
}
const HeaderLeft: React.FC<Props> = ({ type = 'icon', content, onPress }) => {
const HeaderLeft: React.FC<Props> = ({
type = 'icon',
content,
native = true,
onPress
}) => {
const { theme } = useTheme()
const children = useMemo(() => {
@ -42,7 +48,11 @@ const HeaderLeft: React.FC<Props> = ({ type = 'icon', content, onPress }) => {
styles.base,
{
backgroundColor: theme.backgroundGradientStart,
...(type === 'icon' && { height: 44, width: 44, marginLeft: -9 })
...(type === 'icon' && {
height: 44,
width: 44,
marginLeft: native ? -9 : 9
})
}
]}
/>

View File

@ -9,6 +9,7 @@ import { Chase } from 'react-native-animated-spinkit'
export interface Props {
type?: 'icon' | 'text'
content: string
native?: boolean
loading?: boolean
disabled?: boolean
@ -19,6 +20,7 @@ export interface Props {
const HeaderRight: React.FC<Props> = ({
type = 'icon',
content,
native = true,
loading,
disabled,
onPress
@ -88,7 +90,11 @@ const HeaderRight: React.FC<Props> = ({
styles.base,
{
backgroundColor: theme.backgroundGradientStart,
...(type === 'icon' && { height: 44, width: 44, marginRight: -9 })
...(type === 'icon' && {
height: 44,
width: 44,
marginRight: native ? -9 : 9
})
}
]}
/>