import React from "react"; import {TouchableOpacity, View} from "react-native"; import {Card, Title, useTheme} from "react-native-paper"; export interface AMUICardActionProps { actionIcon?: Readonly, actionDisabled?: boolean, onPress?: () => void, onLongPress?: () => void, } export interface AMUICardProps { title: string, children?: Readonly } export function AMUICard(props: AMUICardActionProps & AMUICardProps) { if (props.actionDisabled == undefined && !props.onPress && !props.onLongPress) { return () } return ( ); } export function AMUICardDetail(props: { children?: Readonly }) { return ( {props.children} ) } function CardComponent(props: AMUICardProps & AMUICardActionProps) { const theme = useTheme(); return ( {props.title} {props.children} {props.actionIcon && ( {props.actionIcon} )} ) }