1.0.11 • Published 3 years ago

react-rate-card v1.0.11

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

react rating card

npm NPM

Features

  • Converts rates bewteen coins and currencies
  • Written in TypeScript and has type support
  • Requires antd and axios to work

Installation

npm install react-rate-card

or

yarn add react-rate-card

Usage

...
import RateCard from 'react-rate-card';

<RateCard
  coins={["coin"]} // array of coins
  currencies={["currencier"]} // array of currencies
  defaultSelected="coin" // default selected coin
  currencylayer_access_key="http://apilayer.net/api/live api key"
  coinslayer_access_key="http://api.coinlayer.com/api/live api key"
  customStyles={{...styles}} // style props for the rate card
  customClass="className" // classname to style the rate card
  inputClass="classname" // classname to style inputs
  inputStyle={{...styles}} // style props for inputs
  currencyStyle={{...styles}} // style props for currencies section
  currencyClass="classname" // classname to style currencies section
  errorStyle={{...styles}} // style props to for error message
  errorClass="classname" // classname to style error message
/>

Examples

Source code
Demo

Props

NameTypeDefaultDescription
coinsarray["XLM", "USDT"]Array of coins
currenciesarray["XLM", "USDT", "KES", "RWF", "TZS"]Array of currencies
defaultSelectedstringXLMDefault selected coin
currencylayer_access_keystringnullhttp://apilayer.net/api/live api key (Required)
coinslayer_access_keystringnullhttp://api.coinlayer.com/api/live api key (Required)
customStyleReact.CSSPropertiesnullStyle props for the rate card
customClassstringnullClassname to style the rate card
inputClassstringnullClassname to style inputs
inputStyleReact.CSSPropertiesnullStyle props for inputs
currencyStyleReact.CSSPropertiesnullStyle props for currencies section
currencyClassstringnullClassname to style currencies section
errorStyleReact.CSSPropertiesnullStyle props to for error message
errorClassstringnullClassname to style error message
1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago