updated styles to accommadate for max-width on tablet and minor spacing adjustments
This commit is contained in:
parent
ed743a5414
commit
3bea41041f
2 changed files with 3 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -218,4 +218,4 @@ const SlideItem = ({theme, item, scrollX, index, lastSlideIndex}: Props) => {
|
|||
);
|
||||
};
|
||||
|
||||
export default React.memo(SlideItem);
|
||||
export default React.memo(SlideItem);
|
||||
|
|
|
|||
Loading…
Reference in a new issue