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

Function showNotification

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

Source from the content-addressed store, hash-verified

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

Callers 1

App.tsxFile · 0.85

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected