linkmore-design
Version:
π πlmη»δ»ΆεΊγπ
42 lines (39 loc) β’ 1.52 kB
JavaScript
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
var _excluded = ["prefixCls", "current", "total", "className", "style", "type"];
import * as React from 'react';
import { ConfigContext } from "../config-provider";
import panelRender from "./panelRender";
// import { RawPurePanel as PopoverRawPurePanel } from '../popover/PurePanel';
var PurePanel = function PurePanel(props) {
var customizePrefixCls = props.prefixCls,
_props$current = props.current,
current = _props$current === void 0 ? 0 : _props$current,
_props$total = props.total,
total = _props$total === void 0 ? 6 : _props$total,
className = props.className,
style = props.style,
type = props.type,
restProps = _objectWithoutProperties(props, _excluded);
var _React$useContext = React.useContext(ConfigContext),
getPrefixCls = _React$useContext.getPrefixCls;
var prefixCls = getPrefixCls('tour', customizePrefixCls);
var node = panelRender(_objectSpread(_objectSpread({}, restProps), {}, {
prefixCls: prefixCls,
total: total
}), current, type);
return (
// <PopoverRawPurePanel
// prefixCls={prefixCls}
// className={classNames(className, `${prefixCls}-pure`, type && `${prefixCls}-${type}`)}
// style={style}
// >
// {node}
// </PopoverRawPurePanel>
{
node: node
}
);
// return node as React.ReactElement;
};
export default PurePanel;