import type {A11yProps} from '../../types'; import {Text, View} from 'react-native'; import {cardStyles} from '../../theme'; import {renderIcon} from '../../helpers/renderIcon'; import type {ButtonType, cardTheme, IconProp} from '../../types'; import {CardButton} from './CardButton'; type Props = A11yProps & { buttons: ButtonType[]; description: string; icon?: IconProp; title: string; theme?: cardTheme; }; export const Card = ({ accessibilityLabel, buttons, description, icon, testID, title, theme, }: Props) => { const {backgroundColor, iconSize, themeColor, titleColor, titleSize, shadow} = theme || {}; return ( {!!icon && ( {renderIcon(icon, { size: iconSize ?? 25, color: themeColor ?? '#000000', })} )} {title} {description} {buttons.map((button, idx) => ( ))} ); };