diff --git a/react/features/toolbox/components/native/CustomOptionButton.tsx b/react/features/toolbox/components/native/CustomOptionButton.tsx index 357d20d3e9a4..c236680e9ea5 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 { * * @returns {React.Component} */ - icon = () => ( - - ); + icon = () => { + let iconComponent; + + if (!this.iconSrc) { + return null; + } + + if (this.iconSrc?.includes('svg')) { + iconComponent + = ( + ); + } else { + iconComponent + = ( + ); + } + + return iconComponent; + }; label = this.text; } diff --git a/react/features/toolbox/components/native/styles.ts b/react/features/toolbox/components/native/styles.ts index da33b77ac7ec..ed61e912c3a0 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] } };