@lanaco/lnc-react-ui
Version:
React component library
85 lines (84 loc) • 2.26 kB
JavaScript
import { jsxs as w, jsx as a } from "react/jsx-runtime";
import { memo as T, forwardRef as x } from "react";
import { n as N } from "./emotion-styled.browser.esm-CjCaF13H.js";
import { P as o } from "./index-S5Cd7WrG.js";
import d from "./IconButton.js";
import { u as _ } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
const g = N.div`
font-family: ${(n) => {
var e, t;
return (t = (e = n.theme) == null ? void 0 : e.typography) == null ? void 0 : t.fontFamily;
}};
padding: 5px 8px;
margin-top: auto;
`, i = T(
x(
({
__TYPE__: n = "KANBAN_FOOTER",
id: e,
showAddNewCard: t = !1,
showLoadMoreCards: s = !1,
addNewCardText: C = "Add New Card",
onAddNewCard: m = () => {
},
onLoadMoreCards: p = () => {
},
className: l = "",
style: c = {},
color: b = "primary",
children: f,
...y
}, u) => {
const h = _();
return /* @__PURE__ */ w(
g,
{
ref: u,
theme: h,
className: l,
style: c,
...y,
children: [
f,
s && /* @__PURE__ */ a(
d,
{
onClick: (r) => p(r, e),
icon: "chevron-circle-down",
btnType: "outline",
style: { maxWidth: "unset", width: "100%", marginBottom: "8px" }
}
),
t && /* @__PURE__ */ a(
d,
{
onClick: (r) => m(r, e),
icon: "plus-circle",
btnType: "outline",
style: { maxWidth: "unset", width: "100%", marginBottom: "8px" }
}
)
]
}
);
}
)
);
i.propTypes = {
__TYPE__: o.string,
id: o.oneOfType([o.string, o.number]),
//---------------------------------------------------------
showLoadMoreCards: o.bool,
showAddNewCard: o.bool,
addNewCardText: o.string,
//---------------------------------------------------------
onAddNewCard: o.func,
onLoadMoreCards: o.func,
//---------------------------------------------------------
className: o.string,
style: o.object
};
i.displayName = "KANBAN_FOOTER";
export {
i as default
};