All files / src/components/EnterpriseSettings/Branding/Provider CustomThemeProvider.tsx

60% Statements 3/5
100% Branches 0/0
50% Functions 1/2
50% Lines 2/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19        456x                         1183x  
import React, { createContext, useContext } from "react";
import useThemeManager from "../hooks/useThemeManager";
 
type ThemeTypes = ReturnType<typeof useThemeManager>;
const CustomThemeContext = createContext<ThemeTypes>({} as any);
 
function CustomThemeProvider({ children }: { children: React.ReactNode }) {
  const data = useThemeManager();
  return (
    <CustomThemeContext.Provider value={data}>
      {children}
    </CustomThemeContext.Provider>
  );
}
 
export default CustomThemeProvider;
 
export const useThemeContext = () => useContext(CustomThemeContext);