MCPcopy Create free account
hub / github.com/esengine/esengine / getIcon

Function getIcon

packages/editor-app/src/components/Toast.tsx:53–64  ·  view source on GitHub ↗
(type: ToastType)

Source from the content-addressed store, hash-verified

51 }, []);
52
53 const getIcon = (type: ToastType) => {
54 switch (type) {
55 case 'success':
56 return <CheckCircle size={20} />;
57 case 'error':
58 return <XCircle size={20} />;
59 case 'warning':
60 return <AlertCircle size={20} />;
61 case 'info':
62 return <Info size={20} />;
63 }
64 };
65
66 return (
67 <ToastContext.Provider value={{ showToast, hideToast }}>

Callers 1

ToastProviderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected