| 298 | } |
| 299 | |
| 300 | function NotificationInfo<P extends { title: string; message: string, override_on_click?: () => void }>( |
| 301 | props: P, |
| 302 | ) { |
| 303 | return ( |
| 304 | <div class="bg-zinc-700 bg-opacity-75 p-2 rounded text-white" onclick={(e) => { |
| 305 | if (props.override_on_click) { |
| 306 | e.stopPropagation(); |
| 307 | |
| 308 | props.override_on_click(); |
| 309 | } |
| 310 | }}> |
| 311 | <h3 class="font-extrabold">{props.title}</h3> |
| 312 | <p class="text-sm whitespace-pre-line"> |
| 313 | {props.message} |
| 314 | </p> |
| 315 | </div> |
| 316 | ); |
| 317 | } |
| 318 | |
| 319 | function App() { |
| 320 | const [popup, set_popup] = createSignal<JSX.Element | null>(null); |