mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-20 15:36:18 +00:00
🆙 Init V3
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { createContext, FC, ProviderProps, useContext } from 'react';
|
||||
|
||||
export interface IGridContext
|
||||
{
|
||||
isCssGrid: boolean;
|
||||
}
|
||||
|
||||
const GridContext = createContext<IGridContext>({
|
||||
isCssGrid: false
|
||||
});
|
||||
|
||||
export const GridContextProvider: FC<ProviderProps<IGridContext>> = props =>
|
||||
{
|
||||
return <GridContext.Provider value={ props.value }>{ props.children }</GridContext.Provider>;
|
||||
};
|
||||
|
||||
export const useGridContext = () => useContext(GridContext);
|
||||
Reference in New Issue
Block a user