@uva-glass/component-library
Version:
React components UvA
54 lines (53 loc) • 1.65 kB
JavaScript
import { jsx as e, jsxs as m, Fragment as i } from "react/jsx-runtime";
import { fn as s } from "../../index-DXR-TB1d.js";
import { Sortable as o } from "./Sortable.js";
import { InputField as c } from "../InputField/InputField.js";
import { Icon as d } from "../Icon/Icon.js";
import { Button as p } from "../Buttons/Button.js";
import "../Buttons/LinkButton.js";
import "@react-aria/button";
const b = "<Sortable onSort={onSortFunction} ItemHandlePlacement={ItemHandlePlacement} scrollable={scrollable} disabled={disabled}> {children} </ Sortable>", j = {
title: "Organisms/Sortable",
component: o,
argTypes: {
children: {
table: {
disable: !0
}
},
ItemHandlePlacement: {
table: {
disable: !0
}
}
},
parameters: {
inspectComponent: o,
codeString: b
}
}, l = {
ItemHandlePlacement: "left",
onSort: s()
}, r = ["Item-1", "Item-2", "Item-3", "Item-4", "Item-5"], a = (n) => /* @__PURE__ */ e(o, { ...n, children: r }), h = a.bind({});
h.args = {
...l
};
const f = a.bind({});
f.args = {
...l,
ItemHandlePlacement: "right"
};
const I = (n) => /* @__PURE__ */ e(o, { ...n, children: r.map((t) => /* @__PURE__ */ m(i, { children: [
/* @__PURE__ */ e("div", { style: { width: "100%" }, children: /* @__PURE__ */ e(c, { id: t, placeholder: t }, t) }),
/* @__PURE__ */ e(p, { variant: "blank-icon", children: /* @__PURE__ */ e(d, { name: "Trash", color: "#a0002aff" }) })
] }, t)) }), g = I.bind({});
g.args = {
...l
};
export {
h as SortableExample,
g as WithComplexChildren,
j as default,
f as withHandleRight
};
//# sourceMappingURL=Sortable.stories.js.map