Skip to content

Commit

Permalink
chore: yeet small label in ramps input field
Browse files Browse the repository at this point in the history
  • Loading branch information
chidg committed Jan 17, 2025
1 parent 0493e9d commit 229013b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export type InputWithSideComponentProps = {
React.InputHTMLAttributes<HTMLInputElement>,
HTMLInputElement
>
inputFieldLabel: string | number
inputType: "string" | "number"
inputPlaceholder: string
isLoading?: boolean
Expand All @@ -18,7 +17,6 @@ export type InputWithSideComponentProps = {

export const InputWithSideComponent = ({
inputFieldProps,
inputFieldLabel,
inputType,
inputPlaceholder,
isLoading,
Expand Down Expand Up @@ -47,9 +45,6 @@ export const InputWithSideComponent = ({
{...inputFieldProps}
onChange={onInputChange}
/>
<div className={classNames("text-tiny", !inputFieldLabel && "invisible")}>
{inputFieldLabel ?? "..."}
</div>
</div>
{sideComponent}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export const BuyTokensFiatAmountInput = () => {
return (
<InputWithSideComponent
inputFieldProps={register("fiatAmount")}
inputFieldLabel={fiatCurrency || "$0"}
inputType="number"
inputPlaceholder="0"
onInputChange={(e) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@ export const BuyTokensTokenAmountInput = () => {
setValue("dirtyAmountField", "tokenAmount", { shouldValidate: true })
}

const [fiatAmount, { decimals }] = watch(["fiatAmount", "rampTokenAsset"])
const { decimals } = watch("rampTokenAsset")

return (
<InputWithSideComponent
inputFieldProps={register("tokenAmount")}
inputFieldLabel={`$${fiatAmount || "0"}`}
inputType="number"
inputPlaceholder="0"
onInputChange={(e: React.ChangeEvent<HTMLInputElement>) => {
Expand Down

0 comments on commit 229013b

Please sign in to comment.