Skip to content

Commit

Permalink
fix: Input components in form tag (#992)
Browse files Browse the repository at this point in the history
  • Loading branch information
rin-st authored Nov 21, 2024
1 parent ecffcbf commit 3024992
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const AddressCopyIcon = ({ className, address }: { className?: string; ad
}, 800);
}}
>
<button onClick={e => e.stopPropagation()}>
<button onClick={e => e.stopPropagation()} type="button">
{addressCopied ? (
<CheckCircleIcon className={className} aria-hidden="true" />
) : (
Expand Down
1 change: 1 addition & 0 deletions packages/nextjs/components/scaffold-eth/Balance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const Balance = ({ address, className = "", usdMode }: BalanceProps) => {
<button
className={`btn btn-sm btn-ghost flex flex-col font-normal items-center hover:bg-transparent ${className}`}
onClick={toggleDisplayUsdMode}
type="button"
>
<div className="w-full flex items-center justify-center">
{displayUsdMode ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ export const Bytes32Input = ({ value, onChange, name, placeholder, disabled }: C
onChange={onChange}
disabled={disabled}
suffix={
<div
<button
className="self-center cursor-pointer text-xl font-semibold px-4 text-accent"
onClick={convertStringToBytes32}
type="button"
>
#
</div>
</button>
}
/>
);
Expand Down
5 changes: 3 additions & 2 deletions packages/nextjs/components/scaffold-eth/Input/BytesInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ export const BytesInput = ({ value, onChange, name, placeholder, disabled }: Com
onChange={onChange}
disabled={disabled}
suffix={
<div
<button
className="self-center cursor-pointer text-xl font-semibold px-4 text-accent"
onClick={convertStringToBytes}
type="button"
>
#
</div>
</button>
}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export const EtherInput = ({
className="btn btn-primary h-[2.2rem] min-h-[2.2rem]"
onClick={toggleDisplayUsdMode}
disabled={!displayUsdMode && !nativeCurrencyPrice}
type="button"
>
<ArrowsRightLeftIcon className="h-3 w-3 cursor-pointer" aria-hidden="true" />
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export const IntegerInput = ({
className={`${disabled ? "cursor-not-allowed" : "cursor-pointer"} font-semibold px-4 text-accent`}
onClick={multiplyBy1e18}
disabled={disabled}
type="button"
>
</button>
Expand Down

0 comments on commit 3024992

Please sign in to comment.