jiti-meet/react/features/base/dialog/constants.js

69 lines
1.6 KiB
JavaScript
Raw Normal View History

// @flow
export type DialogProps = {
2017-11-13 15:54:04 +00:00
/**
* Whether cancel button is disabled. Enabled by default.
*/
2019-03-19 15:42:25 +00:00
cancelDisabled: ?boolean,
/**
* Optional i18n key to change the cancel button title.
*/
2019-03-19 15:42:25 +00:00
cancelKey: ?string,
/**
* The React {@code Component} children which represents the dialog's body.
*/
2019-03-19 15:42:25 +00:00
children: ?React$Node,
/**
* Is ok button enabled/disabled. Enabled by default.
*/
2019-03-19 15:42:25 +00:00
okDisabled: ?boolean,
/**
* Optional i18n key to change the ok button title.
*/
2019-03-19 15:42:25 +00:00
okKey: ?string,
/**
* The handler for onCancel event.
*/
2017-11-13 15:54:04 +00:00
onCancel: Function,
/**
* The handler for the event when submitting the dialog.
*/
2017-11-13 15:54:04 +00:00
onSubmit: Function,
/**
2018-10-18 08:28:08 +00:00
* Additional style to be applied on the dialog.
*
* NOTE: Not all dialog types support this!
*/
2018-10-18 08:28:08 +00:00
style?: Object,
/**
* Key to use for showing a title.
*/
2019-03-19 15:42:25 +00:00
titleKey: ?string,
/**
* 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.
2021-11-04 21:10:43 +00:00
* The latter is unused.
*/
2019-03-19 15:42:25 +00:00
titleString: ?string
};
2018-10-18 08:28:08 +00:00
/**
* A preferred (or optimal) dialog size. This constant is reused in many
* components, where dialog size optimization is suggested.
*
* NOTE: Even though we support valious devices, including tablets, we don't
* want the dialogs to be oversized even on larger devices. This number seems
* to be a good compromise, but also easy to update.
*/
export const PREFERRED_DIALOG_SIZE = 300;