index.js 438 B

12345678910111213141516
  1. import React from 'react';
  2. import './index.less';
  3. function Button(props) {
  4. const { children, className = '', theme = 'theme', size = 'basic', disabled, radius, width } = props;
  5. return (
  6. <div
  7. style={{ width: width || '' }}
  8. className={`button ${className} ${theme} ${size} ${disabled ? 'disabled' : ''} ${radius ? 'radius' : ''}`}
  9. >
  10. {children}
  11. </div>
  12. );
  13. }
  14. Button.propTypes = {};
  15. export default Button;