import React from 'react';
import './index.less';

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