UNPKG

zent

Version:

一套前端设计语言和基于React的实现

14 lines (13 loc) 673 B
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime"; import { Icon } from '../../icon'; var ProgressInfo = function (props) { var type = props.type, percent = props.percent, format = props.format, state = props.state, color = props.color; if (state === 'success') { return (_jsx(Icon, { type: type === 'circle' ? 'check' : 'check-circle', style: { color: color } }, void 0)); } if (state === 'exception') { return (_jsx(Icon, { type: type === 'circle' ? 'close' : 'close-circle', style: { color: color } }, void 0)); } return _jsx(_Fragment, { children: format(percent) }, void 0); }; export default ProgressInfo;