Product Catalog index form
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
import { useState } from 'react'; | |
import Head from "next/head" | |
const Home = () => { | |
return ( | |
<div className= 'product-catalog'> | |
<div className="product-container mt-5 md:mt-0 md:col-span-2"> | |
<form action="#" method="POST"> | |
<div className="shadow sm:rounded-md sm:overflow-hidden"> | |
<div className="px-4 py-5 bg-white space-y-6 sm:p-6"> | |
<div> | |
<label htmlFor="about" className="block text-sm font-medium text-gray-700"> | |
Product Name | |
</label> | |
<div className="mt-1"> | |
<textarea | |
id="about" | |
name="about" | |
rows={1} | |
className="shadow-sm focus:ring-indigo-500 focus:border-indigo-500 mt-1 block w-full sm:text-sm border border-gray-300 rounded-md" | |
/> | |
</div> | |
</div> | |
<div> | |
<label htmlFor="price" className="block text-sm font-medium text-gray-700"> | |
Price | |
</label> | |
<div className="mt-1 relative rounded-md shadow-sm"> | |
<div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"> | |
<span className="text-gray-500 sm:text-sm">$</span> | |
</div> | |
<input | |
type="text" | |
name="price" | |
id="price" | |
className="focus:ring-indigo-500 focus:border-indigo-500 block w-full pl-7 pr-12 sm:text-sm border-gray-300 rounded-md" | |
placeholder="0.00" | |
/> | |
</div> | |
</div> | |
<button className="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded" type="button"> | |
Upload files | |
</button> | |
<div className="px-4 py-3 bg-gray-50 text-right sm:px-6"> | |
<button | |
type="submit" | |
className="cursor inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" | |
> | |
Save | |
</button> | |
</div> | |
</div> | |
</div> | |
</form> | |
</div> | |
</div> | |
) | |
} | |
export default Home; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment