"Fossies" - the Fresh Open Source Software Archive

Member "jitsi-meet-7307/react/features/toolbox/components/native/ScreenSharingButton.tsx" (30 May 2023, 1016 Bytes) of package /linux/misc/jitsi-meet-7307.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TSX (TypeScript with React) source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "ScreenSharingButton.tsx": jitsi-meet_8319_vs_jitsi-meet_8615.

    1 import React from 'react';
    2 import { Platform } from 'react-native';
    3 import { connect } from 'react-redux';
    4 
    5 import { IReduxState } from '../../../app/types';
    6 import { isDesktopShareButtonDisabled } from '../../functions.native';
    7 
    8 import ScreenSharingAndroidButton from './ScreenSharingAndroidButton';
    9 import ScreenSharingIosButton from './ScreenSharingIosButton';
   10 
   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 /**
   23  * Maps (parts of) the redux state to the associated props for the
   24  * {@code ScreenSharingButton} component.
   25  *
   26  * @param {Object} state - The Redux state.
   27  * @private
   28  * @returns {Object}
   29  */
   30 function _mapStateToProps(state: IReduxState) {
   31     return {
   32         _disabled: isDesktopShareButtonDisabled(state)
   33     };
   34 }
   35 
   36 export default connect(_mapStateToProps)(ScreenSharingButton);