Feat: web app dark mode (#14732)

This commit is contained in:
KVOJJJin
2025-03-03 14:44:51 +08:00
committed by GitHub
parent e53052ab7a
commit d0d0bf570e
98 changed files with 3006 additions and 2496 deletions

View File

@@ -1,5 +1,7 @@
import React from 'react'
import s from './style.module.css'
import ActionButton from '../action-button'
import cn from '@/utils/classnames'
type ISVGBtnProps = {
isSVG: boolean
@@ -11,12 +13,9 @@ const SVGBtn = ({
setIsSVG,
}: ISVGBtnProps) => {
return (
<div
className={'box-border p-0.5 flex items-center justify-center rounded-md bg-white cursor-pointer'}
onClick={() => { setIsSVG(prevIsSVG => !prevIsSVG) }}
>
<div className={`w-6 h-6 rounded-md hover:bg-gray-50 ${s.svgIcon} ${isSVG ? s.svgIconed : ''}`}></div>
</div>
<ActionButton onClick={() => { setIsSVG(prevIsSVG => !prevIsSVG) }}>
<div className={cn('w-4 h-4', isSVG ? s.svgIconed : s.svgIcon)}></div>
</ActionButton>
)
}