index.js 374 B

1234567891011121314
  1. import React from 'react';
  2. import './index.less';
  3. function RadioItem(props) {
  4. const { className = '', checked, theme = 'default', onClick } = props;
  5. return (
  6. <div
  7. className={`radio-item ${className} ${theme} ${checked ? 'checked' : ''}`}
  8. onClick={() => !checked && onClick && onClick()}
  9. />
  10. );
  11. }
  12. RadioItem.propTypes = {};
  13. export default RadioItem;