import React, { useContext } from 'react'; import { Animated, StyleSheet, TouchableOpacity, View } from 'react-native'; import { SliderContext } from './SliderProvider'; import { ButtonType } from '../types/Button.types'; import Button from './Button'; const styles = StyleSheet.create({ wrapper: { flex: 1, justifyContent: 'center', alignItems: 'center', }, }); const Next = () => { const { renderNextButton, renderDoneButton, buttonsMaxSize, nextLabel, doneLabel, slide, goToNewSlide, isLastSlide, animations, } = useContext(SliderContext); const { _opacityOfNextButton, _opacityOfDoneButton } = animations; const renderDefaultNextButton = (label: string) => (