2017-09-18 07:01:14 +00:00
|
|
|
import PropTypes from 'prop-types';
|
2017-06-04 03:12:04 +00:00
|
|
|
|
2017-06-07 16:45:04 +00:00
|
|
|
export const DIALOG_PROP_TYPES = {
|
2017-06-04 03:12:04 +00:00
|
|
|
/**
|
|
|
|
* Whether cancel button is disabled. Enabled by default.
|
|
|
|
*/
|
2017-09-18 07:01:14 +00:00
|
|
|
cancelDisabled: PropTypes.bool,
|
2017-06-04 03:12:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Optional i18n key to change the cancel button title.
|
|
|
|
*/
|
2017-09-18 07:01:14 +00:00
|
|
|
cancelTitleKey: PropTypes.string,
|
2017-06-04 03:12:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Is ok button enabled/disabled. Enabled by default.
|
|
|
|
*/
|
2017-09-18 07:01:14 +00:00
|
|
|
okDisabled: PropTypes.bool,
|
2017-06-04 03:12:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Optional i18n key to change the ok button title.
|
|
|
|
*/
|
2017-09-18 07:01:14 +00:00
|
|
|
okTitleKey: PropTypes.string,
|
2017-06-04 03:12:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The handler for onCancel event.
|
|
|
|
*/
|
2017-09-18 07:01:14 +00:00
|
|
|
onCancel: PropTypes.func,
|
2017-06-04 03:12:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The handler for the event when submitting the dialog.
|
|
|
|
*/
|
2017-09-18 07:01:14 +00:00
|
|
|
onSubmit: PropTypes.func,
|
2017-06-04 03:12:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Used to obtain translations in children classes.
|
|
|
|
*/
|
2017-09-18 07:01:14 +00:00
|
|
|
t: PropTypes.func,
|
2017-06-04 03:12:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Key to use for showing a title.
|
|
|
|
*/
|
2017-09-18 07:01:14 +00:00
|
|
|
titleKey: PropTypes.string,
|
2017-06-04 03:12:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The string to use as a title instead of {@code titleKey}. If a truthy
|
|
|
|
* value is specified, it takes precedence over {@code titleKey} i.e.
|
|
|
|
* the latter is unused.
|
|
|
|
*/
|
2017-09-18 07:01:14 +00:00
|
|
|
titleString: PropTypes.string
|
2017-06-04 03:12:04 +00:00
|
|
|
};
|