0.3.1 • Published 5 years ago

seasoned-credit-card-form-web v0.3.1

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

seasoned-credit-card-form-web

A formik credit card form to speed up the development

NPM JavaScript Style Guide Maintainability Test Coverage

Install

npm install --save seasoned-credit-card-form-web

Usage

import React, { Component } from 'react'
import { MuiThemeProvider, createMuiTheme } from '@material-ui/core/styles'
import { PaymentForm } from 'seasoned-credit-card-form-web'
import 'react-credit-cards/es/styles-compiled.css'

const theme = createMuiTheme({})

const Example = props => (
  <MuiThemeProvider theme={theme}>
    <PaymentForm
      onSubmit={values => doSomething(values)}
      submitting={false}
      error={serverError}
      acceptedCards={['visa', 'amex', 'elo', 'mastercard', 'diners', 'hipercard']}
    />
  </MuiThemeProvider>
)

License

MIT © SeasonedSoftware