UNPKG

choerodon-ui

Version:

An enterprise-class UI design language and React-based implementation

29 lines (23 loc) 671 B
import React from 'react'; import { observer } from 'mobx-react-lite'; function getCount(count) { if (typeof count === 'function') { return count(); } return count; } var Count = observer(function Count(props) { var count = props.count, overflowCount = props.overflowCount, prefixCls = props.prefixCls; var number = getCount(count); if (number) { return React.createElement("span", { className: "".concat(prefixCls, "-tab-count") }, overflowCount && number > overflowCount ? "".concat(overflowCount, "+") : number); } return null; }); Count.displayName = 'Count'; export default Count; //# sourceMappingURL=Count.js.map