import { html, Component } from "../lib/index.js"; export default class JoinForm extends Component { state = { channel: "#", }; constructor(props) { super(props); this.handleChange = this.handleChange.bind(this); this.handleSubmit = this.handleSubmit.bind(this); } handleChange(event) { var target = event.target; var value = target.type == "checkbox" ? target.checked : target.value; this.setState({ [target.name]: value }); } handleSubmit(event) { event.preventDefault(); var params = { channel: this.state.channel, }; this.props.onSubmit(params); } render() { return html`


`; } }