UNPKG

acud

Version:

acg react 组件库

30 lines • 1.26 kB
import _extends from "@babel/runtime/helpers/esm/extends"; /** * @file clear * @author xuemin02 */ 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 React from 'react'; import classnames from 'classnames'; import OutlinedCloseBold from "acud-icon/es/icons/OutlinedCloseBold"; import { ConfigContext } from '../config-provider'; var Clear = function Clear(props) { var customizePrefixCls = props.prefixCls, className = props.className, otherProps = __rest(props, ["prefixCls", "className"]); var _React$useContext = React.useContext(ConfigContext), getPrefixCls = _React$useContext.getPrefixCls; var prefixCls = getPrefixCls('clear', customizePrefixCls); var clearCls = classnames(prefixCls, className); return /*#__PURE__*/React.createElement(OutlinedCloseBold, _extends({ className: clearCls }, otherProps)); }; export default Clear;