File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed
suite-native/firmware/src/components Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change 1+ import { FadeInDown , FadeOutDown } from 'react-native-reanimated' ;
2+
13import {
4+ AnimatedBox ,
25 BottomSheetModal ,
3- Box ,
46 Button ,
57 InlineAlertBox ,
68 Text ,
79 VStack ,
810 useBottomSheetModal ,
911} from '@suite-native/atoms' ;
1012import { Translation } from '@suite-native/intl' ;
13+ import { prepareNativeStyle , useNativeStyles } from '@trezor/styles' ;
1114
1215type DoNotCloseAppBottomSheetTriggerProps = {
1316 isTriggerDisplayed : boolean ;
1417} ;
1518
19+ const triggerStyle = prepareNativeStyle ( utils => ( {
20+ position : 'absolute' ,
21+ bottom : 0 ,
22+ width : '100%' ,
23+ alignItems : 'center' ,
24+ justifyContent : 'center' ,
25+ marginBottom : utils . spacings . sp32 ,
26+ } ) ) ;
27+
1628export const DoNotCloseAppBottomSheetTrigger = ( {
1729 isTriggerDisplayed,
1830} : DoNotCloseAppBottomSheetTriggerProps ) => {
1931 const { bottomSheetRef, openModal, closeModal } = useBottomSheetModal ( ) ;
32+ const { applyStyle } = useNativeStyles ( ) ;
2033
2134 return (
2235 < >
2336 { isTriggerDisplayed && (
24- < Box marginBottom = "sp32" alignItems = "center" justifyContent = "center" >
37+ < AnimatedBox
38+ entering = { FadeInDown }
39+ exiting = { FadeOutDown }
40+ style = { applyStyle ( triggerStyle ) }
41+ >
2542 < InlineAlertBox
2643 variant = "info"
2744 title = {
@@ -32,7 +49,7 @@ export const DoNotCloseAppBottomSheetTrigger = ({
3249 }
3350 onButtonPress = { openModal }
3451 />
35- </ Box >
52+ </ AnimatedBox >
3653 ) }
3754 < BottomSheetModal ref = { bottomSheetRef } paddingHorizontal = "sp24" >
3855 < VStack spacing = "sp24" paddingBottom = "sp24" >
You can’t perform that action at this time.
0 commit comments