Last active
November 16, 2024 20:39
-
-
Save codigoconjuan/ce042907833da206c4a230bda0e05d66 to your computer and use it in GitHub Desktop.
Formulario para crear Productos en Next.js y NestJS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default async function ProductForm() { | |
return ( | |
<> | |
<div className="space-y-2 "> | |
<label | |
htmlFor="name" | |
className="block" | |
>Nombre Producto</label> | |
<input | |
id="name" | |
type="text" | |
placeholder="Nombre Producto" | |
className="border border-gray-300 w-full p-2" | |
name="name" | |
/> | |
</div> | |
<div className="space-y-2 "> | |
<label | |
htmlFor="price" | |
className="block" | |
>Precio</label> | |
<input | |
id="price" | |
type="number" | |
placeholder="Precio Producto" | |
className="border border-gray-300 w-full p-2" | |
name="price" | |
min={0} | |
/> | |
</div> | |
<div className="space-y-2 "> | |
<label | |
htmlFor="inventory" | |
className="block" | |
>Inventario</label> | |
<input | |
id="inventory" | |
type="number" | |
placeholder="Cantidad Disponible" | |
className="border border-gray-300 w-full p-2" | |
name="inventory" | |
min={0} | |
/> | |
</div> | |
<div className="space-y-2 "> | |
<label | |
htmlFor="categoryId" | |
className="block" | |
>Categoría</label> | |
<select | |
id="categoryId" | |
className="border border-gray-300 w-full p-2 bg-white" | |
name="categoryId" | |
> | |
<option value="">Seleccionar Categoría</option> | |
</select> | |
</div> | |
</> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment