From 3bea41041f15aaa65ebc127a5ec2b9423a7fd4b7 Mon Sep 17 00:00:00 2001 From: Matthew Birtch Date: Fri, 25 Nov 2022 16:44:19 -0500 Subject: [PATCH] updated styles to accommadate for max-width on tablet and minor spacing adjustments --- app/screens/onboarding/footer_buttons.tsx | 6 ++---- app/screens/onboarding/slide.tsx | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/screens/onboarding/footer_buttons.tsx b/app/screens/onboarding/footer_buttons.tsx index 7125e002d..cf01c3ce2 100644 --- a/app/screens/onboarding/footer_buttons.tsx +++ b/app/screens/onboarding/footer_buttons.tsx @@ -7,11 +7,10 @@ import Animated, {Extrapolate, interpolate, useAnimatedStyle} from 'react-native import CompassIcon from '@components/compass_icon'; import FormattedText from '@components/formatted_text'; +import {ONBOARDING_CONTENT_MAX_WIDTH} from '@screens/onboarding/slide'; import {buttonBackgroundStyle, buttonTextStyle} from '@utils/buttonStyles'; import {makeStyleSheetFromTheme} from '@utils/theme'; -import {ONBOARDING_CONTENT_MAX_WIDTH} from '@screens/onboarding/slide'; - type Props = { theme: Theme; lastSlideIndex: number; @@ -50,7 +49,6 @@ const getStyleSheet = makeStyleSheetFromTheme((theme: Theme) => ({ const AnimatedButton = Animated.createAnimatedComponent(Pressable); const BUTTON_SIZE = 100; - const FooterButtons = ({ theme, nextSlideHandler, @@ -59,7 +57,7 @@ const FooterButtons = ({ scrollX, }: Props) => { const {width} = useWindowDimensions(); - const buttonWidth = Math.min(width * .8, ONBOARDING_CONTENT_MAX_WIDTH); + const buttonWidth = Math.min(width * 0.8, ONBOARDING_CONTENT_MAX_WIDTH); const styles = getStyleSheet(theme); // keep in mind penultimate and ultimate slides to run buttons text/opacity/size animations diff --git a/app/screens/onboarding/slide.tsx b/app/screens/onboarding/slide.tsx index 97829a39c..6c22d8fe7 100644 --- a/app/screens/onboarding/slide.tsx +++ b/app/screens/onboarding/slide.tsx @@ -218,4 +218,4 @@ const SlideItem = ({theme, item, scrollX, index, lastSlideIndex}: Props) => { ); }; -export default React.memo(SlideItem); \ No newline at end of file +export default React.memo(SlideItem);