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.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. // @flow
  2. export type DialogProps = {
  3. /**
  4. * Whether cancel button is disabled. Enabled by default.
  5. */
  6. cancelDisabled: ?boolean,
  7. /**
  8. * Optional i18n key to change the cancel button title.
  9. */
  10. cancelKey: ?string,
  11. /**
  12. * The React {@code Component} children which represents the dialog's body.
  13. */
  14. children: ?React$Node,
  15. /**
  16. * Is ok button enabled/disabled. Enabled by default.
  17. */
  18. okDisabled: ?boolean,
  19. /**
  20. * Optional i18n key to change the ok button title.
  21. */
  22. okKey: ?string,
  23. /**
  24. * The handler for onCancel event.
  25. */
  26. onCancel: Function,
  27. /**
  28. * The handler for the event when submitting the dialog.
  29. */
  30. onSubmit: Function,
  31. /**
  32. * Additional style to be applied on the dialog.
  33. *
  34. * NOTE: Not all dialog types support this!
  35. */
  36. style?: Object,
  37. /**
  38. * Key to use for showing a title.
  39. */
  40. titleKey: ?string,
  41. /**
  42. * The string to use as a title instead of {@code titleKey}. If a truthy
  43. * value is specified, it takes precedence over {@code titleKey} i.e.
  44. * the latter is unused.
  45. */
  46. titleString: ?string
  47. };
  48. /**
  49. * A preferred (or optimal) dialog size. This constant is reused in many
  50. * components, where dialog size optimization is suggested.
  51. *
  52. * NOTE: Even though we support valious devices, including tablets, we don't
  53. * want the dialogs to be oversized even on larger devices. This number seems
  54. * to be a good compromise, but also easy to update.
  55. */
  56. export const PREFERRED_DIALOG_SIZE = 300;