mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-07-21 07:58:11 -07:00
website_next: part 2
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { onPlainClick } from "./events.js";
|
||||
|
||||
/**
|
||||
* @param {"tip"} name
|
||||
* @param {string} label
|
||||
* @param {string} mobileLabel
|
||||
* @param {string} title
|
||||
* @param {() => void} handler
|
||||
*/
|
||||
export function createEdgeButton(name, label, mobileLabel, title, handler) {
|
||||
const button = document.createElement("button");
|
||||
|
||||
button.type = "button";
|
||||
button.title = title;
|
||||
button.ariaLabel = title;
|
||||
button.dataset.edge = name;
|
||||
button.dataset.mobileLabel = mobileLabel;
|
||||
button.textContent = label;
|
||||
onPlainClick(button, handler);
|
||||
|
||||
return button;
|
||||
}
|
||||
Reference in New Issue
Block a user