1.0.0 • Published 2 years ago

@eteg/react-inputs v1.0.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

@garden/components npm version

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 nameTypedefaultdescriptionrequired
valuestring | numberAmount to be converted into currencyno
defaultValuestringInitial value in inputno
formatOptionsIntl.NumberFormatOptionsSets currency formattingyes
localestringCountry the currencyno
maxnumberMaximum value in inputno
autoFocusbooleanfalseSet auto focus on inputno
autoResetbooleanfalseSet auto reset on inputno
autoSelectbooleanfalseSet auto select on inputno