-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fix(lib): input, add `data-focus` #5298 #5327 * fix(lib): numebr input, add controls border highlight * fix(lib): number input, `controls` now default to true * fix: currency input add jsdoc * replace balance input with currency input #5928 * fix(lib): number input, historical reason, result type should be number, and add `props.stringMode` #5323 #5928 * fix(lib): number input, should handle on blur to fix min/max value #5323 * replace input number with number input #5928 * replace balance input with currency input #5928 * revert(lib): number input, remove `stringMode` * fix: convert to number input result to number
- Loading branch information
Showing
12 changed files
with
33 additions
and
193 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
// packages/next-common/components/balanceInput.js | ||
|
||
import NumberInput from "next-common/lib/input/number"; | ||
import { forwardRef } from "react"; | ||
|
||
const CurrencyInput = forwardRef(CurrencyInputImpl); | ||
export default CurrencyInput; | ||
|
||
/** | ||
* @param {NumberInputProps} props | ||
*/ | ||
function CurrencyInputImpl(props, ref) { | ||
return <NumberInput ref={ref} allowDecimals controls={false} {...props} />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/next-common/components/treasury/tip/popup/tipValue.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
import React from "react"; | ||
import BalanceInput from "../../../balanceInput"; | ||
import Labeled from "../../../Labeled"; | ||
import { useChainSettings } from "../../../../context/chain"; | ||
import CurrencyInput from "next-common/components/currencyInput"; | ||
|
||
export default function TipValue({ setValue }) { | ||
const { symbol } = useChainSettings(); | ||
|
||
return ( | ||
<Labeled text={"Value"} tooltip={"The amount of tip value"}> | ||
<BalanceInput setValue={setValue} symbol={symbol} /> | ||
<CurrencyInput onValueChange={setValue} symbol={symbol} /> | ||
</Labeled> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters