選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

ScreenSharingButton.tsx 1.1KB

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