UNPKG

@alicloudfe/components

Version:

A react component library for aliyun

28 lines (27 loc) 1.05 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 { Pagination as NextPagination } from '@alifd/next'; import { withThemeClass } from '../utils/withThemeClass'; import React from 'react'; import { useCssVar } from '../utils/useCssVar'; var Pagination = (function (props) { var theme = useCssVar('--alicloudfe-components-theme').trim(); // 混合云云效主题默认不显示下一页 var shape = (function () { if (theme.startsWith('hybridcloud') || theme.startsWith('yunxiao')) { return 'arrow-only'; } return 'normal'; })(); return React.createElement(NextPagination, __assign({ shape: shape }, props)); }); export default withThemeClass(Pagination);