Component library setup (#115)

This commit is contained in:
Salih Altun
2024-03-21 00:07:02 +03:00
committed by GitHub
parent a27e1dcd81
commit d2ca6ca792
14 changed files with 1543 additions and 342 deletions

View File

@@ -0,0 +1,11 @@
import { useContext } from "react";
import { ThemeProviderContext } from "./themeProviderContext";
export const useTheme = () => {
const context = useContext(ThemeProviderContext);
if (context === undefined)
throw new Error("useTheme must be used within a ThemeProvider");
return context;
};