- format long import statements with consistent line wrapping - apply consistent indentation across client and server modules - remove generated tsconfig.tsbuildinfo file
13 lines
363 B
TypeScript
13 lines
363 B
TypeScript
import { createContext } from 'react';
|
|
|
|
export type ToastVariant = 'success' | 'error' | 'info';
|
|
|
|
export interface ToastApi {
|
|
show: (message: string, variant?: ToastVariant) => void;
|
|
success: (message: string) => void;
|
|
error: (message: string) => void;
|
|
info: (message: string) => void;
|
|
}
|
|
|
|
export const ToastContext = createContext<ToastApi | null>(null);
|