RC-88 | String Set Input

This commit is contained in:
Oliver-Akins 2025-01-10 00:54:16 -07:00
parent d0374880bc
commit 000f490584
7 changed files with 95 additions and 6 deletions

View file

@ -0,0 +1,25 @@
import { localizer } from "../../utils/Localizer.mjs";
export function stringSet(input, data) {
const label = localizer(input.label);
if (!data.meta.editable) {
return `<div data-input-type="string-set">
<span class="label">${label}</span>
<span>${input.value}</span>
</div>`;
};
return `<div data-input-type="string-set">
<label
for="${data.meta.idp}-traits"
>
${label}
</label>
<string-tags
id="${data.meta.idp}-traits"
value="${input.value}"
name="${input.path}"
/>
</div>`;
};