mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-20 07:26:19 +00:00
🆙 Init V3
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { createContext, FC, ProviderProps, useContext } from 'react';
|
||||
|
||||
interface INitroCardContext
|
||||
{
|
||||
theme: string;
|
||||
}
|
||||
|
||||
const NitroCardContext = createContext<INitroCardContext>({
|
||||
theme: null
|
||||
});
|
||||
|
||||
export const NitroCardContextProvider: FC<ProviderProps<INitroCardContext>> = props =>
|
||||
{
|
||||
return <NitroCardContext.Provider value={ props.value }>{ props.children }</NitroCardContext.Provider>;
|
||||
};
|
||||
|
||||
export const useNitroCardContext = () => useContext(NitroCardContext);
|
||||
Reference in New Issue
Block a user