JSPM

@eteg/react-inputs

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q27294F
  • License Apache-2.0

Custom components relating based on Zendesk Garden Design System

Package Exports

  • @eteg/react-inputs
  • @eteg/react-inputs/dist/index.cjs.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 (@eteg/react-inputs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@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 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