Skip to content

Commit

Permalink
update: icons in ModeToogle
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelTeida committed Jan 28, 2024
1 parent 3d5cb88 commit c3f0ebe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/ModeToggle.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import {useEffect, useState} from 'react'
import {Button, useColorScheme} from '@mui/joy';

import LightModeIcon from '@mui/icons-material/LightMode';
import DarkModeRoundedIcon from '@mui/icons-material/DarkModeRounded';


function ModeToggle() {
const { mode, setMode } = useColorScheme();
Expand All @@ -22,6 +25,7 @@ function ModeToggle() {
setMode(mode === 'light' ? 'dark' : 'light');
}}
>
{mode === 'light' ? <DarkModeRoundedIcon sx={{mr: 1}} /> : <LightModeIcon sx={{mr: 1}}/>}
{mode === 'light' ? 'Turn dark' : 'Turn light'}
</Button>
);
Expand Down

0 comments on commit c3f0ebe

Please sign in to comment.