this repo has no description
1import { For, Show } from 'solid-js';
2import './ConfirmationPopup.css';
3import { ConfirmationManager } from '../Mangers/ConfirmationManager';
4
5export let ConfirmationPopup = () => {
6 return (
7 <>
8 <Show when={ConfirmationManager.Instance.Shown()}>
9 <div class="confirmation-blackout">
10 <div class="confirmation-popup">
11 <h2>{ConfirmationManager.Instance.Text()}</h2>
12 <p>{ConfirmationManager.Instance.Body()}</p>
13
14 <div class="confirmation-buttons">
15 <For each={ConfirmationManager.Instance.Buttons()}>
16 { item =>
17 <div
18 class="confirmation-button"
19 onClick={() => {
20 ConfirmationManager.Instance.CancelConfirmation();
21 item.callback();
22 }}
23 >
24 { item.text }
25 </div>
26 }
27 </For>
28
29 <div
30 class="confirmation-button"
31 onClick={() => ConfirmationManager.Instance.CancelConfirmation()}
32 >
33 Cancel
34 </div>
35 </div>
36 </div>
37 </div>
38 </Show>
39 </>
40 )
41}