File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
apps/frontend/src/components/ui Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ export const AnimatedThemeToggler = ({
1919} : AnimatedThemeTogglerProps ) => {
2020 const { theme, setTheme } = useTheme ( ) ;
2121 const [ mounted , setMounted ] = useState ( false ) ;
22- // eslint-disable-next-line no-undef
2322 const buttonRef = useRef < HTMLButtonElement > ( null ) ;
2423
2524 useEffect ( ( ) => {
@@ -44,9 +43,13 @@ export const AnimatedThemeToggler = ({
4443
4544 await transition . ready ;
4645
46+ const clipPath = isDark
47+ ? [ 'inset(0 0 100% 0)' , 'inset(0 0 0 0)' ]
48+ : [ 'inset(100% 0 0 0)' , 'inset(0 0 0 0)' ] ;
49+
4750 document . documentElement . animate (
4851 {
49- clipPath : [ 'inset(0 0 100% 0)' , 'inset(0 0 0 0)' ] ,
52+ clipPath,
5053 } ,
5154 {
5255 duration,
Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ export default [
4646 sessionStorage : 'readonly' ,
4747 Element : 'readonly' ,
4848 HTMLElement : 'readonly' ,
49+ HTMLButtonElement : 'readonly' ,
50+ HTMLInputElement : 'readonly' ,
51+ HTMLDivElement : 'readonly' ,
4952 Event : 'readonly' ,
5053 KeyboardEvent : 'readonly' ,
5154 MouseEvent : 'readonly' ,
You can’t perform that action at this time.
0 commit comments