You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

constants.js 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import PropTypes from 'prop-types';
  2. export const DIALOG_PROP_TYPES = {
  3. /**
  4. * Whether cancel button is disabled. Enabled by default.
  5. */
  6. cancelDisabled: PropTypes.bool,
  7. /**
  8. * Optional i18n key to change the cancel button title.
  9. */
  10. cancelTitleKey: PropTypes.string,
  11. /**
  12. * Is ok button enabled/disabled. Enabled by default.
  13. */
  14. okDisabled: PropTypes.bool,
  15. /**
  16. * Optional i18n key to change the ok button title.
  17. */
  18. okTitleKey: PropTypes.string,
  19. /**
  20. * The handler for onCancel event.
  21. */
  22. onCancel: PropTypes.func,
  23. /**
  24. * The handler for the event when submitting the dialog.
  25. */
  26. onSubmit: PropTypes.func,
  27. /**
  28. * Used to obtain translations in children classes.
  29. */
  30. t: PropTypes.func,
  31. /**
  32. * Key to use for showing a title.
  33. */
  34. titleKey: PropTypes.string,
  35. /**
  36. * The string to use as a title instead of {@code titleKey}. If a truthy
  37. * value is specified, it takes precedence over {@code titleKey} i.e.
  38. * the latter is unused.
  39. */
  40. titleString: PropTypes.string
  41. };