MCPcopy Create free account
hub / github.com/TanStack/query / showNotification

Function showNotification

examples/solid/offline-solid-router/src/App.tsx:38–49  ·  view source on GitHub ↗
(message: string, type: 'success' | 'error')

Source from the content-addressed store, hash-verified

36})
37
38function showNotification(message: string, type: 'success' | 'error') {
39 const el = document.createElement('div')
40 el.style.cssText = `
41 position: fixed; top: 16px; right: 16px; z-index: 9999;
42 padding: 12px 24px; border-radius: 4px; color: white;
43 background: ${type === 'success' ? '#22c55e' : '#ef4444'};
44 animation: fadeIn 0.3s ease-in;
45 `
46 el.textContent = message
47 document.body.appendChild(el)
48 setTimeout(() => el.remove(), 3000)
49}
50
51let isRestoring = true
52

Callers 1

App.tsxFile · 0.70

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected