feat(админка): действия в карточке и тост отмены

This commit is contained in:
anor
2026-11-06 22:01:23 +10:00
parent e15369c4d4
commit 0e9a95e95b
9 changed files with 166 additions and 9 deletions
+10
View File
@@ -0,0 +1,10 @@
import { h } from '/static/admin2/vendor/preact.module.js';
import htm from '/static/admin2/vendor/htm.module.js';
const html = htm.bind(h);
export const Toast = ({ message, onUndo, onClose }) => html`
<div class="toast" role="status">
<span>${message}</span>
${onUndo && html`<button type="button" onClick=${onUndo}>Отменить</button>`}
<button type="button" class="toast-close" onClick=${onClose} aria-label="Закрыть">×</button>
</div>`;