Files
coastal_timesheet/src/components/ThemeToggle.jsx
T
Bizzle b5e7c8796f Initial commit: Coastal Timesheet App with comprehensive features
- Employee name validation for all submissions
- Complete entry validation (all fields required when any field has input)
- Dynamic auto-resizing work description fields
- Optimized field layout (Homeowner → Hours → Work Description)
- Professional PDF generation with validation
- Email/share functionality with validation
- Data import/export capabilities
- Dark/light theme support
- Mobile-responsive design
- Local data persistence
- Multiple entries per day support
- Custom homeowner management
- Comprehensive README with deployment instructions
- Production build ready for web hosting
2025-08-19 08:21:20 -04:00

19 lines
496 B
React

import { Sun, Moon } from 'lucide-react';
const ThemeToggle = ({ isDark, toggleTheme }) => {
return (
<button
onClick={toggleTheme}
className="p-2 rounded-lg bg-gray-200 dark:bg-gray-700 hover:bg-gray-300 dark:hover:bg-gray-600 transition-colors"
aria-label="Toggle theme"
>
{isDark ? (
<Sun className="h-5 w-5 text-yellow-500" />
) : (
<Moon className="h-5 w-5 text-gray-700" />
)}
</button>
);
};
export default ThemeToggle;