49 lines
1.4 KiB
TypeScript
49 lines
1.4 KiB
TypeScript
import React from 'react';
|
|
import { TouchableOpacity, StyleSheet, ViewStyle } from 'react-native';
|
|
import { LinearGradient } from 'expo-linear-gradient';
|
|
import Svg, { Path } from 'react-native-svg';
|
|
import { OnboardingColors } from '@/constants/OnboardingTheme';
|
|
|
|
interface NextButtonProps {
|
|
onPress: () => void;
|
|
disabled?: boolean;
|
|
style?: ViewStyle;
|
|
}
|
|
|
|
export function NextButton({ onPress, disabled, style }: NextButtonProps) {
|
|
return (
|
|
<TouchableOpacity onPress={onPress} disabled={disabled} activeOpacity={0.8} style={[styles.container, style]}>
|
|
<LinearGradient
|
|
colors={[OnboardingColors.buttonStart, OnboardingColors.buttonEnd]}
|
|
start={{ x: 0, y: 0 }}
|
|
end={{ x: 1, y: 1 }}
|
|
style={[styles.gradient, disabled && styles.disabled]}
|
|
>
|
|
<Svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="white" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
|
<Path d="M5 12h14M12 5l7 7-7 7" />
|
|
</Svg>
|
|
</LinearGradient>
|
|
</TouchableOpacity>
|
|
);
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
container: {
|
|
shadowColor: OnboardingColors.buttonEnd,
|
|
shadowOffset: { width: 0, height: 4 },
|
|
shadowOpacity: 0.3,
|
|
shadowRadius: 8,
|
|
elevation: 5,
|
|
},
|
|
gradient: {
|
|
width: 64,
|
|
height: 64,
|
|
borderRadius: 32,
|
|
justifyContent: 'center',
|
|
alignItems: 'center',
|
|
},
|
|
disabled: {
|
|
opacity: 0.5,
|
|
},
|
|
});
|