Files
rowy/src/components/ConfirmationDialog/Context.ts

9 lines
311 B
TypeScript
Raw Normal View History

2020-10-13 16:48:17 +11:00
import React, { useContext } from "react";
import { IConfirmation, CONFIRMATION_EMPTY_STATE } from "./props";
const ConfirmationContext = React.createContext<IConfirmation>(
2021-09-01 15:59:30 +10:00
CONFIRMATION_EMPTY_STATE
2020-10-13 16:48:17 +11:00
);
export default ConfirmationContext;
export const useConfirmation = () => useContext(ConfirmationContext);