This package includes several varieties of notifications and wells within the Garden Design System.
Installation
npm install @garden/components
# Peer Dependencies - Also Required
npm install react react-dom styled-components @zendeskgarden/react-theming
Usage
import { ThemeProvider } from '@zendeskgarden/react-theming';
import { InputCurrency } from '@garden/components';
/**
* Place a `ThemeProvider` at the root of your React application
*/
<ThemeProvider>
<InputCurrency
formatOptions={{
currency: 'BRL',
style: 'currency',
maximumFractionDigits: 2,
minimumFractionDigits: 2
}}
/>
</ThemeProvider>;
InputCurrency
Extends RefAttributes
Prop name | Type | default | description | required |
---|---|---|---|---|
value | string | number | Amount to be converted into currency | no | |
defaultValue | string | Initial value in input | no | |
formatOptions | Intl.NumberFormatOptions | Sets currency formatting | yes | |
locale | string | Country the currency | no | |
max | number | Maximum value in input | no | |
autoFocus | boolean | false | Set auto focus on input | no |
autoReset | boolean | false | Set auto reset on input | no |
autoSelect | boolean | false | Set auto select on input | no |