()
| 314 | } |
| 315 | |
| 316 | export function AlertExamples() { |
| 317 | const [starRating, setStarRating] = useState(0) |
| 318 | |
| 319 | return ( |
| 320 | <div className="card p-6 lg:p-8 space-y-12"> |
| 321 | {/* Header Section */} |
| 322 | <header className="text-center space-y-3"> |
| 323 | <h2 className="text-2xl lg:text-3xl font-bold text-text"> |
| 324 | Alert System Showcase |
| 325 | </h2> |
| 326 | <p className="text-text-secondary text-lg max-w-2xl mx-auto leading-relaxed"> |
| 327 | A comprehensive collection of notification patterns that provide clear |
| 328 | feedback and guide user interactions with semantic colors and |
| 329 | meaningful animations. |
| 330 | </p> |
| 331 | </header> |
| 332 | |
| 333 | <div className="space-y-12"> |
| 334 | {/* Standard Alerts */} |
| 335 | <section className="space-y-6"> |
| 336 | <div className="space-y-2"> |
| 337 | <h3 className="text-xl font-semibold text-text">Standard Alerts</h3> |
| 338 | <p className="text-text-secondary"> |
| 339 | Essential feedback messages for user actions and system states |
| 340 | </p> |
| 341 | </div> |
| 342 | |
| 343 | <div className="grid grid-cols-1 lg:grid-cols-2 gap-4"> |
| 344 | <Alert |
| 345 | dismissible |
| 346 | description="Your profile information has been saved successfully. All changes are now live." |
| 347 | title="Profile Updated" |
| 348 | variant="success" |
| 349 | action={{ |
| 350 | label: 'View Profile', |
| 351 | onClick: () => console.info('View profile'), |
| 352 | variant: 'primary', |
| 353 | }} |
| 354 | /> |
| 355 | |
| 356 | <Alert |
| 357 | dismissible |
| 358 | description="We've added support for P3 wide color gamut in our latest release." |
| 359 | title="Feature Update Available" |
| 360 | variant="info" |
| 361 | action={{ |
| 362 | label: 'Learn More', |
| 363 | onClick: () => console.info('Learn more'), |
| 364 | variant: 'secondary', |
| 365 | }} |
| 366 | /> |
| 367 | |
| 368 | <Alert |
| 369 | dismissible |
| 370 | description="You've used 85% of your storage quota. Consider upgrading your plan." |
| 371 | title="Storage Limit Approaching" |
| 372 | variant="warning" |
| 373 | action={{ |
nothing calls this directly
no outgoing calls
no test coverage detected