UNPKG

@alicloud/console-components

Version:

Alibaba Cloud React Components

28 lines (27 loc) 1.03 kB
var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; import React, { forwardRef } from 'react'; import { Pagination as NextPagination } from '@alifd/next'; import { ETheme } from '../../../enum'; import { useCssTheme } from '../../../hook'; import { hocWithThemeClass } from '../../../hoc'; function Pagination(props, ref) { var theme = useCssTheme(); var shape = (function () { if (theme.startsWith(ETheme.HYBRID) || theme.startsWith(ETheme.YUNXIAO)) { return 'arrow-only'; } return 'normal'; })(); return React.createElement(NextPagination, __assign({ shape: shape }, props, { ref: ref })); } export default hocWithThemeClass(forwardRef(Pagination));