Skip to content

Commit aa2abe2

Browse files
committed
Update contract-function.tsx
1 parent a347856 commit aa2abe2

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

apps/dashboard/src/components/contract-functions/contract-function.tsx

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import {
2525
} from "@chakra-ui/react";
2626
import type { AbiEvent, AbiFunction } from "abitype";
2727
import { camelToTitle } from "contract-ui/components/solidity-inputs/helpers";
28+
import { SearchIcon } from "lucide-react";
2829
import { usePathname, useSearchParams } from "next/navigation";
2930
import { type Dispatch, type SetStateAction, useMemo, useState } from "react";
3031
import type { ThirdwebContract } from "thirdweb";
@@ -427,21 +428,31 @@ export const ContractFunctionsPanel: React.FC<ContractFunctionsPanelProps> = ({
427428
<TabPanels h="auto" overflow="auto">
428429
{writeFunctions.length > 0 && (
429430
<TabPanel p="0">
430-
<Input
431-
placeholder="🔎 Search"
432-
className="sticky top-0 z-10 mb-3 rounded-none border-r-none border-l-none focus-visible:ring-0"
433-
onChange={handleKeywordSearch}
434-
/>
431+
<div className="sticky top-0 z-10 mb-3">
432+
<div className="relative w-full">
433+
<SearchIcon className="-translate-y-1/2 absolute top-[50%] left-3 size-4 text-muted-foreground" />
434+
<Input
435+
placeholder="Search"
436+
className="rounded-none border-r-none border-l-none py-2 pl-9 focus-visible:ring-0"
437+
onChange={handleKeywordSearch}
438+
/>
439+
</div>
440+
</div>
435441
{writeFunctions.map((e) => functionSection(e))}
436442
</TabPanel>
437443
)}
438444
{viewFunctions.length > 0 && (
439445
<TabPanel p="0">
440-
<Input
441-
placeholder="🔎 Search"
442-
className="sticky top-0 z-10 mb-3 rounded-none border-r-none border-l-none focus-visible:ring-0"
443-
onChange={handleKeywordSearch}
444-
/>
446+
<div className="sticky top-0 z-10 mb-3">
447+
<div className="relative w-full">
448+
<SearchIcon className="-translate-y-1/2 absolute top-[50%] left-3 size-4 text-muted-foreground" />
449+
<Input
450+
placeholder="Search"
451+
className="rounded-none border-r-none border-l-none py-2 pl-9 focus-visible:ring-0"
452+
onChange={handleKeywordSearch}
453+
/>
454+
</div>
455+
</div>
445456
{viewFunctions.map((e) => functionSection(e))}
446457
</TabPanel>
447458
)}

0 commit comments

Comments
 (0)