From 648b804e72d4831e41e02dfd7d6b5a9ac7660b58 Mon Sep 17 00:00:00 2001
From: Tom van der Lee <tom@vanderlee.io>
Date: Fri, 30 Aug 2024 11:19:30 +0200
Subject: Added ui

---
 src/contexts/DarkMode.tsx | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

(limited to 'src/contexts/DarkMode.tsx')

diff --git a/src/contexts/DarkMode.tsx b/src/contexts/DarkMode.tsx
index 4326fe9..fd536b2 100644
--- a/src/contexts/DarkMode.tsx
+++ b/src/contexts/DarkMode.tsx
@@ -2,7 +2,7 @@ import * as React from "react";
 import {
   Context,
   createContext,
-  ReactNode,
+  PropsWithChildren,
   useEffect,
   useMemo,
   useState,
@@ -17,11 +17,8 @@ interface DarkModeApi {
 export const DarkModeContext = createContext<Partial<DarkModeApi>>(
   {}
 ) as Context<DarkModeApi>;
-interface DarkModeProviderProps {
-  children: ReactNode;
-}
 
-export default function DarkModeProvider({ children }: DarkModeProviderProps) {
+export default function DarkModeProvider({ children }: PropsWithChildren<any>) {
   const themeConfig = useMemo(() => new ThemeConfig(), []);
   const [darkMode, setDarkMode] = useState(
     () => themeConfig.getTheme() === "dark"
-- 
cgit v1.2.3

