UNPKG

nexo-solutions-review-carousel

Version:

A customizable review carousel component for React applications

63 lines (62 loc) 1.43 kB
/// <reference types="react" /> export interface Review { name: string; image: string; comment: { [key: string]: string; }; location: { [key: string]: string; }; rating: number; sourceUrl?: string; isLocalGuide?: boolean; } export interface ReviewCarouselProps { /** * Array of review objects to display */ reviews: Review[]; /** * Current language code (e.g., 'en', 'pt') */ language: string; /** * Optional custom accent color for pagination bullets and stars */ accentColor?: string; /** * Custom icon URL for review source (e.g., Google logo) */ sourceIconUrl?: string; /** * Callback function when a review is clicked */ onReviewClick?: (review: Review, e: React.MouseEvent) => void; /** * Optional text customization */ translations?: { readMore: { [key: string]: string; }; swipeHint: { [key: string]: string; }; viewOn: { [key: string]: string; }; }; } export interface ReviewModalProps { review: Review | null; language: string; onClose: () => void; accentColor?: string; sourceIconUrl?: string; translations?: { viewOn: { [key: string]: string; }; }; }