eldav1d-marvel-ui
Version:
UI library for (and from) Playing with Marvel API
15 lines (14 loc) • 633 B
JavaScript
import { jsx as c } from "react/jsx-runtime";
import f, { useEffect as a } from "react";
import o from "../CheckboxGroup/CheckboxGroup.js";
const h = ({ options: t, children: l }) => (a(() => {
t.forEach((e, r) => {
const m = l(e, r);
if (f.isValidElement(m) && m.type !== o)
throw new Error("Children must be an instance of CheckboxGroup");
});
}, [t, l]), c("ul", { className: "md:h-full flex flex-col md:flex-row gap-2 md:items-center", children: t.map((e, r) => c("li", { className: "flex items-center", children: l(e, r) }, `${e}${r}`)) }));
export {
h as default
};
//# sourceMappingURL=CheckboxList.js.map