({
onPress,
title,
bgVariant = "primary",
textVariant = "default",
IconLeft,
IconRight,
className,
...props
}: ButtonProps)
| 33 | }; |
| 34 | |
| 35 | const CustomButton = ({ |
| 36 | onPress, |
| 37 | title, |
| 38 | bgVariant = "primary", |
| 39 | textVariant = "default", |
| 40 | IconLeft, |
| 41 | IconRight, |
| 42 | className, |
| 43 | ...props |
| 44 | }: ButtonProps) => { |
| 45 | return ( |
| 46 | <TouchableOpacity |
| 47 | onPress={onPress} |
| 48 | className={`w-full rounded-full p-3 flex flex-row justify-center items-center shadow-md shadow-neutral-400/70 ${getBgVariantStyle(bgVariant)} ${className}`} |
| 49 | {...props} |
| 50 | > |
| 51 | {IconLeft && <IconLeft />} |
| 52 | <Text className={`text-lg font-bold ${getTextVariantStyle(textVariant)}`}> |
| 53 | {title} |
| 54 | </Text> |
| 55 | {IconRight && <IconRight />} |
| 56 | </TouchableOpacity> |
| 57 | ); |
| 58 | }; |
| 59 | |
| 60 | export default CustomButton; |
nothing calls this directly
no test coverage detected