@playbooks/ui
Version:
An interface library for Playbooks.
89 lines (88 loc) • 3.13 kB
JavaScript
;
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require$$0 = require("react/jsx-runtime");
const html = require("./toast-context-kVz4KXNu.cjs");
const navs = require("./navs.cjs");
const Pagination = ({ name = "Pagination", tailwind, className, children, ...props }) => {
const { theme } = html.useInterface();
const base = theme.pagination();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ require$$0.jsx(navs.Nav, { ...computed, children });
};
const PaginationFirst = ({
name = "PaginationFirst",
alt = "first page",
disabled,
tailwind,
className,
onClick,
...props
}) => {
const { theme } = html.useInterface();
const base = theme.paginationBtn();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ require$$0.jsx(html.BtnWrapper, { name, alt, onClick, disabled, ...computed, children: /* @__PURE__ */ require$$0.jsx(html.FarIcon, { icon: "chevrons-left" }) });
};
const PaginationPrev = ({
name = "PaginationPrev",
alt = "prev page",
disabled,
tailwind,
className,
onClick,
...props
}) => {
const { theme } = html.useInterface();
const base = theme.paginationBtn();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ require$$0.jsx(html.BtnWrapper, { name, alt, onClick, disabled, ...computed, children: /* @__PURE__ */ require$$0.jsx(html.FarIcon, { icon: "chevron-left" }) });
};
const PaginationBtn = ({
name = "PaginationBtn",
alt = "specific page",
active,
tailwind,
className = "",
onClick,
children,
...props
}) => {
const { theme } = html.useInterface();
const base = theme.paginationBtn(active);
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ require$$0.jsx(html.BtnWrapper, { name, alt, active, onClick, ...computed, children });
};
const PaginationNext = ({
name = "PaginationNext",
alt = "next page",
disabled,
tailwind,
className,
onClick,
...props
}) => {
const { theme } = html.useInterface();
const base = theme.paginationBtn();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ require$$0.jsx(html.BtnWrapper, { name, alt, onClick, disabled, ...computed, children: /* @__PURE__ */ require$$0.jsx(html.FarIcon, { icon: "chevron-right" }) });
};
const PaginationLast = ({
name = "PaginationLast",
alt = "last page",
disabled,
tailwind,
className,
onClick,
...props
}) => {
const { theme } = html.useInterface();
const base = theme.paginationBtn();
const computed = { ...base, ...props, tailwind, className, name };
return /* @__PURE__ */ require$$0.jsx(html.BtnWrapper, { name, alt, onClick, disabled, ...computed, children: /* @__PURE__ */ require$$0.jsx(html.FarIcon, { icon: "chevrons-right" }) });
};
exports.Pagination = Pagination;
exports.PaginationBtn = PaginationBtn;
exports.PaginationFirst = PaginationFirst;
exports.PaginationLast = PaginationLast;
exports.PaginationNext = PaginationNext;
exports.PaginationPrev = PaginationPrev;