mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 03:12:29 +00:00
feat(toolbox/native): update CustomOptionButton props
This commit is contained in:
committed by
Calinteodor
parent
eee58b2945
commit
5c65446ef4
@@ -10,6 +10,7 @@ import styles from './styles';
|
||||
|
||||
|
||||
interface IProps extends AbstractButtonProps {
|
||||
backgroundColor?: string;
|
||||
icon: any;
|
||||
id?: string;
|
||||
text: string;
|
||||
@@ -21,6 +22,7 @@ interface IProps extends AbstractButtonProps {
|
||||
* @returns {Component}
|
||||
*/
|
||||
class CustomOptionButton extends AbstractButton<IProps> {
|
||||
backgroundColor = this.props.backgroundColor;
|
||||
iconSrc = this.props.icon;
|
||||
id = this.props.id;
|
||||
text = this.props.text;
|
||||
@@ -48,8 +50,7 @@ class CustomOptionButton extends AbstractButton<IProps> {
|
||||
= (
|
||||
<Image
|
||||
source = {{ uri: this.iconSrc }}
|
||||
style = { styles.iconImageStyles }
|
||||
tintColor = { 'white' } />);
|
||||
style = { styles.iconImageStyles } />);
|
||||
}
|
||||
|
||||
return iconComponent;
|
||||
|
||||
@@ -228,11 +228,10 @@ class OverflowMenu extends PureComponent<IProps, IState> {
|
||||
return (
|
||||
<>
|
||||
{
|
||||
_customToolbarButtons.map(({ id, text, icon, ...rest }) => (
|
||||
_customToolbarButtons.map(({ id, text, icon, backgroundColor }) => (
|
||||
<CustomOptionButton
|
||||
{ ...rest }
|
||||
{ ...topButtonProps }
|
||||
|
||||
backgroundColor = { backgroundColor }
|
||||
/* eslint-disable react/jsx-no-bind */
|
||||
handleClick = { () =>
|
||||
dispatch(customOverflowMenuButtonPressed(id, text))
|
||||
|
||||
Reference in New Issue
Block a user