diff options
Diffstat (limited to 'src/components/Prompt.tsx')
-rw-r--r-- | src/components/Prompt.tsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/components/Prompt.tsx b/src/components/Prompt.tsx index 28ec2d036..3b245c440 100644 --- a/src/components/Prompt.tsx +++ b/src/components/Prompt.tsx @@ -78,10 +78,9 @@ export function Actions({children}: React.PropsWithChildren<{}>) { <View style={[ a.w_full, - a.flex_row, a.gap_sm, a.justify_end, - gtMobile && [a.pb_4xl], + gtMobile ? [a.flex_row] : [a.flex_col, a.pt_md, a.pb_4xl], ]}> {children} </View> @@ -92,12 +91,13 @@ export function Cancel({ children, }: React.PropsWithChildren<{onPress?: PressableProps['onPress']}>) { const {_} = useLingui() + const {gtMobile} = useBreakpoints() const {close} = Dialog.useDialogContext() return ( <Button variant="solid" color="secondary" - size="small" + size={gtMobile ? 'small' : 'medium'} label={_(msg`Cancel`)} onPress={() => close()}> {children} @@ -110,6 +110,7 @@ export function Action({ onPress, }: React.PropsWithChildren<{onPress?: () => void}>) { const {_} = useLingui() + const {gtMobile} = useBreakpoints() const {close} = Dialog.useDialogContext() const handleOnPress = React.useCallback(() => { close() @@ -119,7 +120,7 @@ export function Action({ <Button variant="solid" color="primary" - size="small" + size={gtMobile ? 'small' : 'medium'} label={_(msg`Confirm`)} onPress={handleOnPress}> {children} |