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

Restyle login

This commit is contained in:
Zhiyuan Zheng
2020-12-13 21:09:21 +01:00
parent 48cab6053c
commit dc9870beaf
16 changed files with 313 additions and 83 deletions

View File

@ -8,18 +8,17 @@ type PropsBase = {
onPress: () => void
disabled?: boolean
buttonSize?: 'S' | 'M'
size?: 'S' | 'M' | 'L'
}
export interface PropsText extends PropsBase {
text: string
icon?: any
size?: 'S' | 'M' | 'L'
}
export interface PropsIcon extends PropsBase {
text?: string
icon: any
size?: 'S' | 'M' | 'L'
}
const ButtonRow: React.FC<PropsText | PropsIcon> = ({
@ -71,16 +70,13 @@ const styles = StyleSheet.create({
button: {
paddingLeft: StyleConstants.Spacing.M,
paddingRight: StyleConstants.Spacing.M,
borderWidth: 1,
borderRadius: 100
borderWidth: 1.25,
borderRadius: 100,
alignItems: 'center'
},
text: {
textAlign: 'center'
}
})
export default React.memo(ButtonRow, (prev, next) => {
let skipUpdate = true
skipUpdate = prev.disabled === next.disabled
return skipUpdate
})
export default ButtonRow

View File

@ -1,8 +0,0 @@
import React from 'react'
import { Text } from 'react-native'
const PleaseLogin = () => {
return <Text></Text>
}
export default PleaseLogin

View File

@ -15,7 +15,6 @@ import {
import { useTheme } from '@utils/styles/ThemeManager'
import { useNavigation } from '@react-navigation/native'
import getCurrentTab from '@utils/getCurrentTab'
import PleaseLogin from '@components/PleaseLogin'
const Stack = createNativeStackNavigator()
@ -30,9 +29,7 @@ const Page = ({
<View style={{ width: Dimensions.get('window').width }}>
{localRegistered || page === 'RemotePublic' ? (
<Timeline page={page} />
) : (
<PleaseLogin />
)}
) : null}
</View>
)
}