UNPKG

@massds/mayflower-react

Version:

React versions of Mayflower design system UI components

81 lines (80 loc) 2.65 kB
export interface CurrencyProps { required?: boolean; showButtons?: boolean; language?: string; format?: object; max?: number; min?: number; onChange?(...args: unknown[]): unknown; onBlur?(...args: unknown[]): unknown; step?: number; placeholder?: string; id: string; name: string; maxlength?: number; width?: number; disabled?: boolean; } export interface InputCurrencyProps { /** Whether the label should be hidden or not */ hiddenLabel?: boolean; /** The label text for the input field, can be a string or a component */ labelText: string | object; /** Whether the field is required or not */ required?: boolean; /** Whether the field is disabled or not */ disabled?: boolean; /** The unique ID for the input field */ id: string; /** The name for the input field */ name: string; /** The max acceptable input length */ maxlength?: number; /** The pattern to filter input against, e.g. "[0-9]" for numbers only */ pattern?: string; /** The number of characters wide to make the input field */ width?: number; /** The placeholder text for the input field */ placeholder?: string; /** The message to be displayed in the event of an error. */ errorMsg?: string; /** Custom change function */ onChange?(...args: unknown[]): unknown; /** Custom onBlur function */ onBlur?(...args: unknown[]): unknown; /** Default input value */ defaultValue?: string | number; /** Max value for the field. */ max?: number; /** Min value for the field. */ min?: number; /** Using the up/down arrow keys will increment/decrement the input value by this number. */ step?: number; /** A language tag that represents what country the currency should display. Comes from IETF BCP 47: https://numbrojs.com/languages.html */ language?: string; /** Numbro Formatting options for displaying the currency. See https://numbrojs.com/format.html */ format?: object; /** Inline label and input field */ inline?: boolean; /** Whether to render up/down buttons */ showButtons?: boolean; } declare const InputCurrency: { (props: InputCurrencyProps): any; defaultProps: { hiddenLabel: boolean; required: boolean; onChange: any; onBlur: any; language: string; format: { mantissa: number; trimMantissa: boolean; thousandSeparated: boolean; negative: string; }; step: number; showButtons: boolean; }; }; export default InputCurrency;