Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created December 22, 2020 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/8f0ce891e4380a1f631f9eb64d384458 to your computer and use it in GitHub Desktop.
Save parzibyte/8f0ce891e4380a1f631f9eb64d384458 to your computer and use it in GitHub Desktop.
render() {
return (
<div className="column is-one-third">
<h1 className="is-size-3">Agregar videojuego</h1>
<ToastContainer></ToastContainer>
<form className="field" onSubmit={this.manejarEnvioDeFormulario}>
<div className="form-group">
<label className="label" htmlFor="nombre">Nombre:</label>
<input autoFocus required placeholder="Nombre" type="text" id="nombre" onChange={this.manejarCambio} value={this.state.videojuego.nombre} className="input" />
</div>
<div className="form-group">
<label className="label" htmlFor="precio">Precio:</label>
<input required placeholder="Precio" type="number" id="precio" onChange={this.manejarCambio} value={this.state.videojuego.precio} className="input" />
</div>
<div className="form-group">
<label className="label" htmlFor="calificacion">Calificación:</label>
<input required placeholder="Calificación" type="number" id="calificacion" onChange={this.manejarCambio} value={this.state.videojuego.calificacion} className="input" />
</div>
<div className="form-group">
<button className="button is-success mt-2">Guardar</button>
&nbsp;
<Link to="/videojuegos/ver" className="button is-primary mt-2">Volver</Link>
</div>
</form>
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment