import React from 'react' import { Image, Pressable, Text } from 'react-native' import { Palette, Style } from '../styles' import { FONT_FAMILY } from '../styles/Fonts' import { size } from '../styles/Style' import { LinearGradient } from './LinearGradient/LinearGradient' const HEIGHT_BY_SIZE = { small: 44, medium: 50, large: 58, } const FONT_SIZE_BY_SIZE = { small: 14, medium: 15, large: 17, } const GradientButton = ({ title = '', colors = ['#F94697', '#7023F7'], onPress, props, containerStyle = {}, icon, disabled = false, maxWidth = null, size = 'medium', textStyle = {}, gradientStyle = {}, height = null, }) => { const resolvedSize = HEIGHT_BY_SIZE[size] ? size : 'medium' const buttonHeight = typeof height === 'number' ? height : HEIGHT_BY_SIZE[resolvedSize] const fontSize = FONT_SIZE_BY_SIZE[resolvedSize] return ( {icon && } {title} ) } export default GradientButton