kitten-components
Version:
Front-end components library
33 lines (29 loc) • 746 B
JavaScript
import React from 'react'
import classNames from 'classnames'
import { TextInputAndSelect } from 'kitten/components/form/text-input-and-select'
export const FormAmountAndCurrency = props => {
const {
currencyOptions,
currencyName,
currencyValue,
...textInputAndSelectProps
} = props
return (
<TextInputAndSelect
selectOptions={currencyOptions}
selectName={currencyName}
selectValue={currencyValue}
key={currencyName}
type="number"
{...textInputAndSelectProps}
/>
)
}
FormAmountAndCurrency.defaultProps = {
tiny: false,
disabled: false,
currencyOptions: [{ value: 'eur', label: 'EUR' }],
currencyName: null,
currencyValue: null,
digits: null, // 2 or 12 for now
}