diff --git a/src/elements/CopyableInputBox.js b/src/elements/CopyableInputBox.js index 7e1e3a0..8b937a1 100644 --- a/src/elements/CopyableInputBox.js +++ b/src/elements/CopyableInputBox.js @@ -15,10 +15,12 @@ export function CopyableInputBox(text, copyable = true) { "uk-icon": "icon: copy", "role": "img", "aria-label": i18next.t("copy_input_box_copy_icon_text") + }, + thenRun: (e) => { + let clipboard = new ClipboardJS(e); + addClipboardNotifications(clipboard, 600); } }); - let clipboard = new ClipboardJS(inputBoxCopyButton); - addClipboardNotifications(clipboard, 600); } let inputBoxInput = makeElement({ diff --git a/src/elements/Margin.js b/src/elements/Margin.js index 33af061..0473fc2 100644 --- a/src/elements/Margin.js +++ b/src/elements/Margin.js @@ -1,9 +1,10 @@ import { makeElement } from "../htmlUtils.js"; -export function Margin(children) { +export function Margin(children, options = {}) { return makeElement({ tag: "div", class: "uk-margin", - children: children + children: children, + ...options }); } \ No newline at end of file diff --git a/src/elements/MarginInline.js b/src/elements/MarginInline.js index 2125c21..e0b94c1 100644 --- a/src/elements/MarginInline.js +++ b/src/elements/MarginInline.js @@ -1,13 +1,15 @@ import { makeElement } from "../htmlUtils.js"; -export function MarginInline(children) { +export function MarginInline(children, marginOptions = {}, inlineOptions = {}) { return makeElement({ tag: "div", class: "uk-margin", children: makeElement({ tag: "div", class: "uk-inline", - children: children - }) + children: children, + ...inlineOptions, + }), + ...marginOptions, }); } \ No newline at end of file