amis-rpc-design/node_modules/antd/es/tour/PurePanel.js

47 lines
1.6 KiB
JavaScript
Raw Normal View History

2023-10-07 19:42:30 +08:00
"use client";
var __rest = this && this.__rest || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
import classNames from 'classnames';
import * as React from 'react';
import { ConfigContext } from '../config-provider';
import { RawPurePanel as PopoverRawPurePanel } from '../popover/PurePanel';
import TourPanel from './panelRender';
import useStyle from './style';
import { withPureRenderTheme } from '../_util/PurePanel';
const PurePanel = props => {
const {
prefixCls: customizePrefixCls,
current = 0,
total = 6,
className,
style,
type
} = props,
restProps = __rest(props, ["prefixCls", "current", "total", "className", "style", "type"]);
const {
getPrefixCls
} = React.useContext(ConfigContext);
const prefixCls = getPrefixCls('tour', customizePrefixCls);
const [wrapSSR, hashId] = useStyle(prefixCls);
return wrapSSR( /*#__PURE__*/React.createElement(PopoverRawPurePanel, {
prefixCls: prefixCls,
hashId: hashId,
className: classNames(className, `${prefixCls}-pure`, type && `${prefixCls}-${type}`),
style: style
}, /*#__PURE__*/React.createElement(TourPanel, {
stepProps: Object.assign(Object.assign({}, restProps), {
prefixCls,
total
}),
current: current,
type: type
})));
};
export default withPureRenderTheme(PurePanel);