mirror of
https://github.com/Unleash/unleash.git
synced 2024-10-18 20:09:08 +02:00
22 lines
515 B
TypeScript
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;
|