Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yeet small label in ramps input field #1784

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading