Abstract LayoutContext

This commit is contained in:
1ilit
2024-03-09 19:42:09 +02:00
parent c9ad695abb
commit 610e2fa5c5
12 changed files with 77 additions and 27 deletions

View File

@@ -0,0 +1,19 @@
import { createContext, useState } from "react";
export const LayoutContext = createContext();
export default function LayoutContextProvider({ children }) {
const [layout, setLayout] = useState({
header: true,
sidebar: true,
issues: true,
toolbar: true,
fullscreen: false,
});
return (
<LayoutContext.Provider value={{ layout, setLayout }}>
{children}
</LayoutContext.Provider>
);
}