UNPKG

@payfit/unity-components

Version:

27 lines (26 loc) 917 B
import { usePaginationContext as e } from "../PaginationContext.js"; import { forwardRef as t, useMemo as n } from "react"; import { uyTv as r } from "@payfit/unity-themes"; import { jsx as i } from "react/jsx-runtime"; import { useIntl as a } from "react-intl"; //#region src/components/pagination/parts/PaginationContent.tsx var o = r({ base: "uy:flex uy:gap-100 uy:list-none uy:m-0 uy:p-0" }), s = t(({ children: t, ...r }, s) => { let c = a(), { pageCount: l, currentPage: u, a11yIds: d } = e(), f = c.formatMessage({ id: "unity:component:pagination:page-list:label", defaultMessage: "Page {current} of {total}" }, { current: u, total: l }), p = n(() => o(), []); return /* @__PURE__ */ i("ul", { ...r, ref: s, id: d.pagesList, className: p, "aria-label": f, children: t }); }); s.displayName = "PaginationContent"; //#endregion export { s as PaginationContent, o as paginationContent };