Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

ScreenSharingButton.tsx 946B

12345678910111213141516171819202122232425262728293031323334
  1. import React from 'react';
  2. import { Platform } from 'react-native';
  3. import { connect } from '../../../base/redux';
  4. import { isDesktopShareButtonDisabled } from '../../functions.native';
  5. import ScreenSharingAndroidButton from './ScreenSharingAndroidButton.js';
  6. import ScreenSharingIosButton from './ScreenSharingIosButton.js';
  7. const ScreenSharingButton = props => (
  8. <>
  9. {Platform.OS === 'android'
  10. && <ScreenSharingAndroidButton { ...props } />
  11. }
  12. {Platform.OS === 'ios'
  13. && <ScreenSharingIosButton { ...props } />
  14. }
  15. </>
  16. );
  17. /**
  18. * Maps (parts of) the redux state to the associated props for the
  19. * {@code ScreenSharingButton} component.
  20. *
  21. * @param state - The Redux state.
  22. * @private
  23. */
  24. function _mapStateToProps(state: object): object {
  25. return {
  26. _disabled: isDesktopShareButtonDisabled(state)
  27. };
  28. }
  29. export default connect(_mapStateToProps)(ScreenSharingButton);