Ajout du mode clair/sombre (dark mode)
- Installation de next-themes - Création du composant ThemeToggle avec icônes soleil/lune - Intégration du ThemeProvider dans le layout - Ajout du toggle dans la navigation mobile et le header admin - Adaptation des couleurs pour le dark mode (tropical chic) - Mise à jour des composants UI (Card, Button) pour le dark mode - Adaptation des composants principaux (Layout, WifiCard, etc.)
This commit is contained in:
@ -7,10 +7,10 @@ const buttonVariants = cva(
|
||||
{
|
||||
variants: {
|
||||
variant: {
|
||||
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
||||
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
||||
outline: "border-2 border-primary text-primary hover:bg-primary hover:text-white",
|
||||
ghost: "hover:bg-secondary hover:text-secondary-foreground",
|
||||
default: "bg-primary text-primary-foreground hover:bg-primary/90 dark:bg-primary dark:hover:bg-primary/80",
|
||||
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 dark:bg-primary/20 dark:text-primary dark:hover:bg-primary/30",
|
||||
outline: "border-2 border-primary text-primary hover:bg-primary hover:text-white dark:border-primary dark:text-primary dark:hover:bg-primary dark:hover:text-white",
|
||||
ghost: "hover:bg-secondary hover:text-secondary-foreground dark:hover:bg-gray-800 dark:hover:text-gray-200",
|
||||
},
|
||||
size: {
|
||||
default: "h-12 px-6 py-3",
|
||||
|
||||
@ -8,7 +8,7 @@ const Card = React.forwardRef<
|
||||
<div
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"rounded-2xl border border-gray-200 bg-white shadow-sm",
|
||||
"rounded-2xl border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 shadow-sm",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
@ -46,7 +46,7 @@ const CardDescription = React.forwardRef<
|
||||
>(({ className, ...props }, ref) => (
|
||||
<p
|
||||
ref={ref}
|
||||
className={cn("text-sm text-gray-600", className)}
|
||||
className={cn("text-sm text-gray-600 dark:text-gray-400", className)}
|
||||
{...props}
|
||||
/>
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user