12 lines
229 B
TypeScript
12 lines
229 B
TypeScript
|
import React, {useContext} from 'react';
|
||
|
|
||
|
export const Color = React.createContext({
|
||
|
color: '',
|
||
|
setColor: (_value: string) => {},
|
||
|
});
|
||
|
|
||
|
export const useColor = () => {
|
||
|
const context = useContext(Color);
|
||
|
return context;
|
||
|
};
|