How to use the @crave/farmblocks-input-text.defaultProps function in @crave/farmblocks-input-text

To help you get started, we’ve selected a few @crave/farmblocks-input-text examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CraveFood / farmblocks / packages / input-currency / src / CurrencyInput.js View on Github external
withMargin,
} from "@crave/farmblocks-input-text";

const EnhancedCurrencyInput = compose(
  withMargin,
  EnhancedInput,
)(ReactNumberFormat);

EnhancedCurrencyInput.propTypes = {
  ...ReactNumberFormat.propTypes,
  ...TextInput.propTypes,
};

EnhancedCurrencyInput.defaultProps = {
  ...ReactNumberFormat.defaultProps,
  ...TextInput.defaultProps,
  thousandSeparator: ",",
  decimalSeparator: ".",
  decimalScale: 2,
  fixedDecimalScale: true,
  allowNegative: false,
};

export default EnhancedCurrencyInput;

@crave/farmblocks-input-text

A form field to input simple text

MIT
Latest version published 3 years ago

Package Health Score

49 / 100
Full package analysis