nexo-solutions-review-carousel
Version:
A customizable review carousel component for React applications
63 lines (62 loc) • 1.43 kB
TypeScript
/// <reference types="react" />
export interface Review {
name: string;
image: string;
comment: {
[]: string;
};
location: {
[]: 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: {
[]: string;
};
swipeHint: {
[]: string;
};
viewOn: {
[]: string;
};
};
}
export interface ReviewModalProps {
review: Review | null;
language: string;
onClose: () => void;
accentColor?: string;
sourceIconUrl?: string;
translations?: {
viewOn: {
[]: string;
};
};
}