summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2023-05-27 00:30:48 -0600
committerHombreLaser <sebastian-440@live.com>2023-05-27 00:30:48 -0600
commit01ce6eff03e4c427e12d9b2b23ed540698016fa9 (patch)
tree0ef22ac6a4c9fa85c0873c4beda343de8ad4adfa
parentef7a44d526004cdfd56c527f95113150bf8629cf (diff)
Añade más campos de búsqueda
-rw-r--r--src/components/search_bar.tsx32
1 files changed, 28 insertions, 4 deletions
diff --git a/src/components/search_bar.tsx b/src/components/search_bar.tsx
index a33bcca..47c4953 100644
--- a/src/components/search_bar.tsx
+++ b/src/components/search_bar.tsx
@@ -3,17 +3,41 @@ import "./stylesheets/search_bar.css"
export default function SearchBar({ path }) {
return(
- <div>
+ <div className="my-4">
<form action={path} method="get" id="search-form">
<div className="flex justify-start">
<div className="search-bar-field">
- <input className="rounded-l border border-solid border-neutral-300 bg-transparent bg-clip-padding px-3 py-[0.25rem] text-base font-normal leading-[1.6] text-neutral-700 outline-none transition duration-200 ease-in-out focus:z-[3] focus:border-primary focus:text-neutral-700 focus:shadow-[inset_0_0_0_1px_rgb(59,113,202)] focus:outline-none dark:border-neutral-600 dark:text-neutral-200 dark:placeholder:text-neutral-200 dark:focus:border-primary"
- type="text" name="name" id="search"/>
+ <input className="h-10 rounded-lg border border-solid border-neutral-300 bg-transparent bg-clip-padding px-3 py-[0.25rem] text-base font-normal leading-[1.6] text-neutral-700 outline-none transition duration-200 ease-in-out focus:z-[3] focus:border-primary focus:text-neutral-700 focus:shadow-[inset_0_0_0_1px_rgb(59,113,202)] focus:outline-none dark:border-neutral-600 dark:text-neutral-200 dark:placeholder:text-neutral-200 dark:focus:border-primary"
+ type="text" placeholder="Búsqueda" name="name" id="search"/>
+ </div>
+
+ <div className="mx-2">
+ <select id="order-by-price" name="price" className="h-10 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
+ <option value="">Ordenar por precio</option>
+ <option value="asc">Ascendente</option>
+ <option value="desc">Descendente</option>
+ </select>
+ </div>
+
+ <div>
+ <select id="order-by-bulk-price" name="bulk_price" className="h-10 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
+ <option value="">Ordenar por precio al mayoreo</option>
+ <option value="asc">Ascendente</option>
+ <option value="desc">Descendente</option>
+ </select>
+ </div>
+
+ <div className="mx-2">
+ <select id="order-by-availaible-quantity" name="quantity" className="h-10 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
+ <option value="">Ordenar por cantidad disponible</option>
+ <option value="asc">Ascendente</option>
+ <option value="desc">Descendente</option>
+ </select>
</div>
<div>
<button form="search-form"
- className="button rounded-r px-6 py-2 text-xs font-medium uppercase leading-tight text-white shadow-md transition duration-150 ease-in-out hover:bg-primary-700 hover:shadow-lg focus:bg-primary-700 focus:shadow-lg focus:outline-none focus:ring-0 active:bg-primary-800 active:shadow-lg">
+ className="h-10 button rounded-r px-6 py-2 text-xs font-medium uppercase leading-tight text-white shadow-md transition duration-150 ease-in-out hover:bg-primary-700 hover:shadow-lg focus:bg-primary-700 focus:shadow-lg focus:outline-none focus:ring-0 active:bg-primary-800 active:shadow-lg">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"