Skip to content

Commit

Permalink
feat(toolbox/native): update CustomOptionButton props
Browse files Browse the repository at this point in the history
  • Loading branch information
Calinteodor committed Dec 11, 2024
1 parent eee58b2 commit 5c65446
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import styles from './styles';


interface IProps extends AbstractButtonProps {
backgroundColor?: string;
icon: any;
id?: string;
text: string;
Expand All @@ -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;
Expand Down Expand Up @@ -48,8 +50,7 @@ class CustomOptionButton extends AbstractButton<IProps> {
= (
<Image
source = {{ uri: this.iconSrc }}
style = { styles.iconImageStyles }
tintColor = { 'white' } />);
style = { styles.iconImageStyles } />);
}

return iconComponent;
Expand Down
5 changes: 2 additions & 3 deletions react/features/toolbox/components/native/OverflowMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 5c65446

Please sign in to comment.