communications app, popup lib
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { createElement, createElementInit } from "../functions";
|
||||
import { createElement } from "../functions";
|
||||
import { createIcon } from "./icon";
|
||||
|
||||
function fillCheckbox(container, type, label) {
|
||||
@ -9,14 +9,14 @@ function fillCheckbox(container, type, label) {
|
||||
container.appendChild(label);
|
||||
} else if (label?.length > 0) {
|
||||
container.appendChild(
|
||||
createElementInit('span', span => span.innerText = label)
|
||||
createElement('span', span => span.innerText = label)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function createCheckbox(opts = {}) {
|
||||
const container = createElement('label', 'checkbox-wrapper',
|
||||
createElementInit('input', input => {
|
||||
createElement('input', input => {
|
||||
input.setAttribute('type', 'checkbox');
|
||||
if (opts.checked === true) {
|
||||
input.checked = true;
|
||||
|
Reference in New Issue
Block a user