Skip to content

Instantly share code, notes, and snippets.

@Iheanacho-ai
Last active November 20, 2022 14:14
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 Iheanacho-ai/998c7ba832c21a36ff7226e03ee4a4a0 to your computer and use it in GitHub Desktop.
Save Iheanacho-ai/998c7ba832c21a36ff7226e03ee4a4a0 to your computer and use it in GitHub Desktop.
Product Catalog index form
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