Revert "Replace material icons by local png"
This reverts commit a7f76216a0.
This commit is contained in:
@@ -1,11 +1,9 @@
|
|||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import Image from 'next/image'
|
|
||||||
import {styled} from '@mui/material/styles'
|
import {styled} from '@mui/material/styles'
|
||||||
|
import LightModeIcon from '@mui/icons-material/LightMode'
|
||||||
|
import DarkModeIcon from '@mui/icons-material/DarkMode'
|
||||||
import {Box} from '@mui/material'
|
import {Box} from '@mui/material'
|
||||||
|
|
||||||
import lightSwitch from '../public/theme-switch/light.png'
|
|
||||||
import darkSwitch from '../public/theme-switch/dark.png'
|
|
||||||
|
|
||||||
const PREFIX = 'switch-theme'
|
const PREFIX = 'switch-theme'
|
||||||
|
|
||||||
const classes = {
|
const classes = {
|
||||||
@@ -40,23 +38,9 @@ export default function SwitchTheme({switchFixed, mode, setMode}) {
|
|||||||
<StyledBox>
|
<StyledBox>
|
||||||
<div className={switchFixed ? classes.switchFixed : classes.switch} >
|
<div className={switchFixed ? classes.switchFixed : classes.switch} >
|
||||||
{mode === 'dark' ? (
|
{mode === 'dark' ? (
|
||||||
<Image
|
<LightModeIcon onClick={() => handleClick('light')} />
|
||||||
alt='Switch theme to light'
|
|
||||||
width={24}
|
|
||||||
height={24}
|
|
||||||
src={darkSwitch}
|
|
||||||
quality={10}
|
|
||||||
onClick={() => handleClick('light')}
|
|
||||||
/>
|
|
||||||
) : (
|
) : (
|
||||||
<Image
|
<DarkModeIcon onClick={() => handleClick('dark')} />
|
||||||
alt='Switch theme to dark'
|
|
||||||
width={24}
|
|
||||||
height={24}
|
|
||||||
src={lightSwitch}
|
|
||||||
quality={10}
|
|
||||||
onClick={() => handleClick('dark')}
|
|
||||||
/>
|
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</StyledBox>
|
</StyledBox>
|
||||||
|
|||||||
Reference in New Issue
Block a user