8000 GitHub - flywirecorp/flycomponents at v1.0.1
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on May 12, 2022. It is now read-only.
8000
/ flycomponents Public archive

A set of react UI components used to create payment forms in Flywire

Notifications You must be signed in to change notification settings

flywirecorp/flycomponents

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flycomponents

Flycomponents is a set a react UI components used to create payment forms in Flywire.

Components

  • Autocomplete
  • Button
  • Datepicker
  • FormGroup
  • Input
  • InputGroup
  • Label
  • MoneyInput
  • PhoneInput
  • Select
  • Textarea
  • TextInput

FormGroup

Wraps a form field. Adds a label, display errors and help texts.

Requires: Label.

Property Req Type Description Default
children yes node Children node
className no string Rewrite default CSS class
error no string Shows the error message
hint no string Shows help message
label no string Label tag text
name yes string Name and id of the children
required no bool Set the field to required false
Example
<FormGroup name='amount' label='* Payment Amount' className='FormGroup GridColumn'>
  <MoneyInput name='amount' />
</FormGroup>

MoneyInput

MoneyInput is a input field to type a money amount. This amount is autoformated when the user types and follow and can be configurated to follow a currency standard. By default the format is set to follow USD standard.

Requires: InputGroup.

Property Req Type Description Default value
currencySymbol no string Currency symbol "$"
decimalMark no string How decimal are marked "."
maxLength no string, number Input max length 9
name yes string Input name and id
onBlur no func Function executed on blur
onChange no func Function executed when the value changes
subunitToUnit no number Conversion to minimun unit 100
symbolFirst no bool The currency symbol goes before or after the amount true
thousandsSeparator no string Thousands separator ","
value no number, string The input value
Example
// European format
<MoneyInput currencySymbol='€' name='amount' decimalMark=',' symbolFirst={false} thousandsSeparator='.' />
0