Package Exports
- @agoric/ui-components
- @agoric/ui-components/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@agoric/ui-components) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
UI Components
Reusable UI Components for Agoric Dapps, built with React and MaterialUI.
NatAmountInput
A React MaterialUI TextField
Input which allows the user
to enter a Nat
. Handles decimalPlaces
appropriately. This is a
controlled component.
Example:
import { NatAmountInput } from '@agoric/ui-components';
<NatAmountInput
label={label} // the label
value={amount && amount.value} // The value to display. Must be a Nat
decimalPlaces={purse.displayInfo && purse.displayInfo.decimalPlaces}
placesToShow={2}
disabled={disabled} // disable the input
error={amountError} // any error to display
onChange={onAmountChange} // a callback called on user input changing the value
onError={() => {}} // a callback called on errors
/>
Yarn Test
yarn test