parent
a0ea1e0b95
commit
fd42d2ad7f
|
|
@ -24,20 +24,20 @@ export default function Search({
|
|||
action,
|
||||
changeValue,
|
||||
}: {
|
||||
mode: string;
|
||||
value: any;
|
||||
action: (any: any) => any;
|
||||
changeValue: (any: any) => any;
|
||||
mode?: string;
|
||||
value?: any;
|
||||
action?: (any: any) => any;
|
||||
changeValue?: (any: any) => any ;
|
||||
}) {
|
||||
// useEffect(() => {
|
||||
// const isMobile = useMediaQuery({ query: "(max-width: 768px)" });
|
||||
// }, []);
|
||||
return (
|
||||
<div className="relative flex items-center w-full bg-gray-300 lg:w-1/5 rounded-xl">
|
||||
<Input
|
||||
// type="search"
|
||||
id="default-search"
|
||||
className={`mb-0 h-8 bg-[#E9E9E9] border-none focus-visible:none rounded-lg
|
||||
<div className="relative flex items-center w-full bg-gray-300 lg:w-1/5 rounded-xl">
|
||||
<Input
|
||||
// type="search"
|
||||
id="default-search"
|
||||
className={`mb-0 h-8 bg-[#E9E9E9] border-none focus-visible:none rounded-lg
|
||||
block w-full min-w-[13rem] text-xs md:text-sm text-black
|
||||
text-opacity-60 dark:text-white
|
||||
${mode === "controller" && "h-14 "}
|
||||
|
|
@ -46,19 +46,23 @@ export default function Search({
|
|||
"w-full min-w-full bg-white lg:min-w-full h-11"
|
||||
}
|
||||
`}
|
||||
value={value}
|
||||
onChange={(e) => changeValue(e.target.value)}
|
||||
placeholder="جستجو..."
|
||||
required
|
||||
/>
|
||||
{/* <Button
|
||||
value={value}
|
||||
onChange={(e) => {
|
||||
if (changeValue) {
|
||||
changeValue(e.target.value);
|
||||
}
|
||||
}}
|
||||
placeholder="جستجو..."
|
||||
required
|
||||
/>
|
||||
{/* <Button
|
||||
className="absolute left-0 w-auto h-auto bg-transparent text-slate-800"
|
||||
>
|
||||
<CiSearch />
|
||||
</Button> */}
|
||||
<button onClick={action} className="absolute left-3">
|
||||
<CiSearch />
|
||||
</button>
|
||||
</div>
|
||||
<button onClick={action} className="absolute left-3">
|
||||
<CiSearch />
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,7 +152,12 @@ export default function TableController({
|
|||
})}
|
||||
{data.length != 0 &&
|
||||
[...Array(5 - data.length)].map(() => {
|
||||
return <TableRow className="border border-t-0 border-b-0" />;
|
||||
return (
|
||||
<TableRow
|
||||
key={Math.random()}
|
||||
className="border border-t-0 border-b-0"
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</TableBody>
|
||||
</Table>
|
||||
|
|
|
|||
|
|
@ -54,7 +54,6 @@ export default function TopNav() {
|
|||
</svg>
|
||||
</div>
|
||||
|
||||
<Search mode="landing" />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "sootzani",
|
||||
"version": "0.2.4",
|
||||
"version": "0.2.5",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "sootzani",
|
||||
"version": "0.2.4",
|
||||
"version": "0.2.5",
|
||||
"dependencies": {
|
||||
"@hookform/resolvers": "^3.3.2",
|
||||
"@radix-ui/react-alert-dialog": "^1.0.5",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "sootzani",
|
||||
"version": "0.2.4",
|
||||
"version": "0.2.5",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
|
|
|
|||
Loading…
Reference in New Issue