// Dependencies: // * https://www.npmjs.com/package/react-native-gesture-handler import React from 'react'; import { View, Text, Image } from 'react-native'; import { classNames } from '../utils'; import { ViewProps } from 'react-native'; import { Swipeable } from 'react-native-gesture-handler'; export interface NotificationCardProps extends ViewProps { id: string; image: string; title: string; isNew?: boolean; description?: string; time: string; className?: string; renderRightActions?: (dragX) => React.ReactNode; onSwipe?: () => void; } export const NotificationCard: React.FC = ({ image, title, isNew = true, description, time, renderRightActions, onSwipe, ...restOfProps }) => { const handleSwipe = () => { if (onSwipe) { onSwipe(); } }; return ( {isNew && } {title} {time} {description} ); };