UNPKG

antd

Version:

An enterprise-class UI design language and React components implementation

17 lines (16 loc) 512 B
"use client"; import React from 'react'; import CloseCircleFilled from "@ant-design/icons/es/icons/CloseCircleFilled"; import { isPlainObject } from './is'; const getAllowClear = allowClear => { let mergedAllowClear; if (isPlainObject(allowClear) && allowClear?.clearIcon) { mergedAllowClear = allowClear; } else if (allowClear) { mergedAllowClear = { clearIcon: /*#__PURE__*/React.createElement(CloseCircleFilled, null) }; } return mergedAllowClear; }; export default getAllowClear;