index.js 437 B

1234567891011121314
  1. import React, { Component } from 'react';
  2. import './index.less';
  3. import { Icon } from 'antd-mobile';
  4. export default class Checkbox extends Component {
  5. render() {
  6. const { className = '', checked, onClick } = this.props;
  7. return (
  8. <div className={`g-checkbox-wrapper ${className}`} onClick={() => onClick && onClick()}>
  9. <Icon type="check-circle" color={checked ? '#41A6F3' : '#ECEDEE'} />
  10. </div>
  11. );
  12. }
  13. }