saleor-dashboard/src/components/messages/index.ts

13 lines
334 B
TypeScript
Raw Normal View History

2019-06-19 14:40:52 +00:00
import { createContext } from "react";
export interface IMessage {
2019-11-25 16:23:52 +00:00
title?: string;
2019-06-19 14:40:52 +00:00
text: string;
onUndo?: () => void;
}
export type IMessageContext = (message: IMessage) => void;
export const MessageContext = createContext<IMessageContext>(undefined);
export * from "./MessageManager";
export default MessageContext.Consumer;