enable grasscutter checkbox

This commit is contained in:
SpikeHD
2022-05-08 22:02:18 -07:00
parent aa8979d165
commit ba304fa3ea
3 changed files with 35 additions and 10 deletions

View File

@@ -1,15 +1,32 @@
import React from 'react'
interface IProps {
label: string
}
interface IState {
checked: boolean
}
export default class Checkbox extends React.Component<IProps, IState> {
constructor(props: IProps) {
super(props)
this.state = {
checked: false,
}
}
handleChange = () => {
this.setState({ checked: !this.state.checked })
}
render() {
return (
<div className="Checkbox">
<input type="checkbox" onChange={this.handleChange} />
<label>{this.props.label}</label>
</div>
)
}
}