feat(админка): действия в карточке и тост отмены
This commit is contained in:
@@ -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>`;
|
||||
Reference in New Issue
Block a user