import React from 'react'; import { Box, Heading, Image, Text, Pressable, useBreakpointValue, Icon, Row, PresenceTransition, } from 'native-base'; import { StyleProp, ViewStyle } from 'react-native'; import useColorScheme from '../hooks/colorScheme'; type BigActionButtonProps = { title: string; subtitle: string; image?: string; style?: StyleProp; iconName?: string; // It is not possible to recover the type, the `Icon` parameter is `any` as well. // eslint-disable-next-line @typescript-eslint/no-explicit-any iconProvider?: any; onPress: () => void; }; const BigActionButton = ({ title, subtitle, image, style, iconName, iconProvider, onPress, }: BigActionButtonProps) => { const screenSize = useBreakpointValue({ base: 'small', md: 'big' }); const colorScheme = useColorScheme(); const isDark = colorScheme === 'dark'; return ( {({ isHovered }) => { return ( image {title} {isHovered && ( {subtitle} )} ); }} {/* The text should be visible on the bottom left corner and when hovering the button the image will darken and the subtitle will be show in a transition */} ); }; export default BigActionButton;