react-trophies
Version:
Comprehensive achievement and trophy system for React apps with sound effects, notifications, theming, and visual components. Uses React, React-DOM, Sonner (toast notifications), Howler (sound effects), Zustand (state management), React-Confetti (celebrat
32 lines (31 loc) • 1.06 kB
TypeScript
import React from 'react';
import { AchievementDetails } from '../types';
/**
* Props for the AchievementToastContent component
*/
export interface AchievementToastContentProps {
/** The achievement to display in the toast */
achievement: AchievementDetails;
/** Custom icons to use in place of default icons */
icons?: Record<string, string>;
/** Title displayed at the top of the toast (default: "Achievement Unlocked!") */
title?: string;
/** Custom styles for the toast container */
customStyles?: React.CSSProperties;
/** Optional custom classes for styling */
className?: string;
}
/**
* AchievementToastContent - Defines the look of achievement toast notifications
* This component is used internally by the toast() function but doesn't call toast itself
*
* @example
* ```tsx
* <AchievementToastContent
* achievement={achievementObject}
* icons={mergedIcons}
* toastTitle="Achievement Unlocked!"
* />
* ```
*/
export declare const AchievementToastContent: React.FC<AchievementToastContentProps>;