MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / createGroup

Function createGroup

src/dialogs/multiPrompt.js:169–190  ·  view source on GitHub ↗

* Creates a group of inputs * @param {Array } inputs Array of inputs

(inputs)

Source from the content-addressed store, hash-verified

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

Callers 1

multiPromptFunction · 0.85

Calls 2

createInputFunction · 0.85
appendMethod · 0.80

Tested by

no test coverage detected