import React, {Component} from 'react'; import './CheckField.scss'; import {randomClassName} from "../../utils"; const classNames = require('classnames'); class CheckField extends Component { constructor(props) { super(props); this.id = `field-${this.props.name || "noname"}-${randomClassName()}`; } render() { const checked = this.props.checked || false; const small = this.props.small || false; const name = this.props.name || null; const handler = () => { if (this.props.onChange) { this.props.onChange(!checked); } }; return (
); } } export default CheckField;