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

Rewrite all buttons

This commit is contained in:
Zhiyuan Zheng
2020-12-26 23:05:17 +01:00
parent 3ea88d025b
commit da79674548
25 changed files with 497 additions and 583 deletions

View File

@ -10,7 +10,7 @@ import {
import { useSafeAreaInsets } from 'react-native-safe-area-context'
import { useTheme } from '@utils/styles/ThemeManager'
import { StyleConstants } from '@utils/styles/constants'
import { ButtonRow } from '@components/Button'
import Button from '@components/Button'
export interface Props {
children: React.ReactNode
@ -84,12 +84,12 @@ const BottomSheet: React.FC<Props> = ({ children, visible, handleDismiss }) => {
style={[styles.handle, { backgroundColor: theme.background }]}
/>
{children}
<View style={styles.button}>
<ButtonRow
onPress={() => closeModal.start(() => handleDismiss())}
text='取消'
/>
</View>
<Button
type='text'
content='取消'
onPress={() => closeModal.start(() => handleDismiss())}
style={styles.button}
/>
</Animated.View>
</View>
</Modal>
@ -112,8 +112,7 @@ const styles = StyleSheet.create({
top: -StyleConstants.Spacing.M * 2
},
button: {
paddingLeft: StyleConstants.Spacing.Global.PagePadding * 2,
paddingRight: StyleConstants.Spacing.Global.PagePadding * 2
marginHorizontal: StyleConstants.Spacing.Global.PagePadding * 2
}
})