import React from "react";
import CheckboxComponent from "./";
export default {
title: "Components/Checkbox",
component: CheckboxComponent,
parameters: {
docs: {
description: { component: "Custom checkbox input" },
},
},
argTypes: {
onChange: {
action: "onChange",
},
},
};
class Checkbox extends React.Component {
constructor(props) {
super(props);
this.state = {
isChecked: false,
};
}
onChange = (e) => {
this.props.onChange(e);
this.setState({ isChecked: !this.state.isChecked });
};
render() {
return (