UNPKG

mini-check

Version:

21 lines (17 loc) 517 B
import Taro from "@tarojs/taro-h5"; import Nerv from "nervjs"; import { Text } from '@tarojs/components'; import classNames from 'classnames'; import './index.scss'; class CheckBoxItem extends Taro.Component { render() { const { children: children } = this.props; const { compStyle, checked, onClick } = this.props; return <Text onClick={onClick} style={compStyle} className={classNames('item', checked && 'item--checked')}> {children} </Text>; } } export default CheckBoxItem;