import React from 'react'; import './index.less'; function ProgressButton(props) { const { children, className = '', progress, width, onClick } = props; return ( <div style={{ width: width || '' }} className={`progress-button ${className} ${progress > 0 ? 'theme' : 'default'}`} onClick={() => { if (onClick) onClick(); }} > <div className="progress" style={{ width: `${progress}%` }} /> {children} </div> ); } ProgressButton.propTypes = {}; export default ProgressButton;