1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/frontend/src/contexts/UIContext.ts
Fredrik Oseberg e6ae8db442 fix: pnps
2022-01-28 10:51:48 +01:00

22 lines
515 B
TypeScript

import React from 'react';
export interface IToastData {
title: string;
text: string;
components?: JSX.Element[];
show: boolean;
persist: boolean;
confetti?: boolean;
type: string;
}
interface IUIContext {
toastData: IToastData;
setToast: React.Dispatch<React.SetStateAction<IToastData>>;
showFeedback: boolean;
setShowFeedback: React.Dispatch<React.SetStateAction<boolean>>;
}
const UIContext = React.createContext<IUIContext | null>(null);
export default UIContext;