import { Text } from '@tarojs/components';
import Taro, { Component } from '@tarojs/taro';
import classNames from 'classnames';
import './index.scss';

interface CheckBoxItemProps {
  className: any
  compStyle: any
  checked: boolean
  onClick: () => void
}

const CheckBoxItem: React.FC<CheckBoxItemProps> = ({ compStyle, checked, onClick, children }) => {
  return (
    <Text
      onClick={onClick}
      style={compStyle}
      className={classNames('item', checked && 'item--checked')}
    >
      {children}
    </Text>
  )
}

export default CheckBoxItem
