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