mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-06-19 19:26:12 -07:00
24 lines
553 B
JavaScript
24 lines
553 B
JavaScript
import { createElement } from "../dom.js";
|
|
|
|
/**
|
|
* @typedef {Object} EmptyOptions
|
|
* @property {() => void} onAdd
|
|
*/
|
|
|
|
/**
|
|
* @param {EmptyOptions} options
|
|
*/
|
|
export function createEmpty(options) {
|
|
const empty = createElement("section", "wallets__empty");
|
|
const text = document.createElement("p");
|
|
const button = document.createElement("button");
|
|
|
|
text.append("No wallet imported yet");
|
|
button.type = "button";
|
|
button.append("Add wallet");
|
|
button.addEventListener("click", options.onAdd);
|
|
empty.append(text, button);
|
|
|
|
return empty;
|
|
}
|