Countdown
Countdown timer displaying human-readable time remaining or elapsed. Auto-warns with red background when less than 2 hours remain.Import
Props
Target date to count down to (or count up from if past)
Background color (overridden by warning red when less than 2 hours remain)
Text and icon color (overridden by white when warning)
Custom styles for the container
Usage
Notes
- Uses moment.js with Spanish locale for human-readable formatting
- Shows “restantes” (remaining) when target is in future
- Shows “de retraso” (overdue) when target is in past
- Automatically switches to warning red background when less than 2 hours remain
- Warning state also changes text/icon to white
- Includes clock icon from lucide-react