Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
feat(toolbox/native): fixed icon for CustomOptionButton and styles
Calin-Teodor55e9136b91a8
diff --git a/react/features/toolbox/components/native/CustomOptionButton.tsx b/react/features/toolbox/components/native/CustomOptionButton.tsxindex 357d20d3e9..c236680e9e 100644--- a/react/features/toolbox/components/native/CustomOptionButton.tsx+++ b/react/features/toolbox/components/native/CustomOptionButton.tsx@@ -1,10 +1,10 @@import React from 'react';import { Image } from 'react-native';+import { SvgCssUri } from 'react-native-svg';import { connect } from 'react-redux';import { translate } from '../../../base/i18n/functions';-import AbstractButton, { IProps as AbstractButtonProps }- from '../../../base/toolbox/components/AbstractButton';+import AbstractButton, { IProps as AbstractButtonProps } from '../../../base/toolbox/components/AbstractButton';import styles from './styles';@@ -30,11 +30,30 @@ class CustomOptionButton extends AbstractButton<IProps> {** @returns {React.Component}*/- icon = () => (- <Image- source = {{ uri: this.iconSrc }}- style = { styles.iconImageStyles } />- );+ icon = () => {+ let iconComponent;++ if (!this.iconSrc) {+ return null;+ }++ if (this.iconSrc?.includes('svg')) {+ iconComponent+ = (+ <SvgCssUri+ style = { styles.iconImageStyles }+ uri = { this.iconSrc } />);+ } else {+ iconComponent+ = (+ <Image+ source = {{ uri: this.iconSrc }}+ style = { styles.iconImageStyles }+ tintColor = { 'white' } />);+ }++ return iconComponent;+ };label = this.text;}diff --git a/react/features/toolbox/components/native/styles.ts b/react/features/toolbox/components/native/styles.tsindex da33b77ac7..ed61e912c3 100644--- a/react/features/toolbox/components/native/styles.ts+++ b/react/features/toolbox/components/native/styles.ts@@ -106,8 +106,8 @@ const styles = {},iconImageStyles: {- height: BaseTheme.spacing[5],- width: BaseTheme.spacing[5]+ height: BaseTheme.spacing[4],+ width: BaseTheme.spacing[4]}};