From 260cedd0e852c1caa141be6f97850dd77853b820 Mon Sep 17 00:00:00 2001 From: freirart Date: Tue, 30 Apr 2024 17:29:28 -0300 Subject: [PATCH] moon and sun svg, no selection and text css --- public/images/moon.svg | 10 ++++++++++ public/images/sun.svg | 19 +++++++++++++++++++ .../ColorModeSwitch/ColorModeSwitch.tsx | 17 ++++++++++++----- 3 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 public/images/moon.svg create mode 100644 public/images/sun.svg diff --git a/public/images/moon.svg b/public/images/moon.svg new file mode 100644 index 0000000..67679af --- /dev/null +++ b/public/images/moon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/public/images/sun.svg b/public/images/sun.svg new file mode 100644 index 0000000..12a74aa --- /dev/null +++ b/public/images/sun.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/components/ColorModeSwitch/ColorModeSwitch.tsx b/src/components/ColorModeSwitch/ColorModeSwitch.tsx index ce2d44e..0a34d5e 100644 --- a/src/components/ColorModeSwitch/ColorModeSwitch.tsx +++ b/src/components/ColorModeSwitch/ColorModeSwitch.tsx @@ -1,3 +1,5 @@ +import Image from 'next/image'; + interface ColorModeSwitchProps { isDarkMode: boolean; onToggle: Function; @@ -11,16 +13,21 @@ export default function ColorModeSwitch({
onToggle()} className="flex absolute bottom-8 right-8 w-12 h-6 rounded-full - dark:bg-light-blue dark:text-special-black bg-special-black - text-white-blue text-center cursor-pointer" + dark:bg-white-blue bg-special-black cursor-pointer" > - {isDarkMode ? '🌞' : '🌙'} + Sun
);