您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

functions.js 551B

1234567891011121314151617
  1. /* @flow */
  2. import { toState } from '../redux';
  3. /**
  4. * Checks if a {@code Dialog} with a specific {@code component} is currently
  5. * open.
  6. *
  7. * @param {Function|Object} stateful - The redux store, the redux
  8. * {@code getState} function, or the redux state itself.
  9. * @param {React.Component} component - The {@code component} of a
  10. * {@code Dialog} to be checked.
  11. * @returns {boolean}
  12. */
  13. export function isDialogOpen(stateful: Function | Object, component: Object) {
  14. return toState(stateful)['features/base/dialog'].component === component;
  15. }