* Creates a group of inputs * @param {Array } inputs Array of inputs
(inputs)
| 167 | * @param {Array<Input>} inputs Array of inputs |
| 168 | */ |
| 169 | function createGroup(inputs) { |
| 170 | const $text = tag("span", { |
| 171 | className: "hero", |
| 172 | }); |
| 173 | const $group = tag("div", { |
| 174 | className: "input-group", |
| 175 | child: $text, |
| 176 | }); |
| 177 | |
| 178 | inputs.map((input) => { |
| 179 | let $input; |
| 180 | |
| 181 | if (typeof input === "string") { |
| 182 | $text.textContent = input; |
| 183 | } else { |
| 184 | $input = createInput(input, true); |
| 185 | $group.append($input); |
| 186 | } |
| 187 | }); |
| 188 | |
| 189 | $body.append($group); |
| 190 | } |
| 191 | |
| 192 | /** |
| 193 | * Creates an input |
no test coverage detected