mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-14 19:47:47 +00:00
* add custom remote menu button * add config for custom buttons * whitelist custom buttons flag * add toolbox custom button * fix notify toolbox buttons * whitelist toolbar custom buttons * rename and fix notify * rename participant remote menu * revert some flag wrong changes * fix some formatings * add undefined type to custom buttons toolbox * code review * code review 2 * fix linting issue
28 lines
688 B
TypeScript
28 lines
688 B
TypeScript
import React, { useCallback } from 'react';
|
|
|
|
import ContextMenuItem from '../../../base/ui/components/web/ContextMenuItem';
|
|
|
|
const CustomOptionButton = (
|
|
{ icon: iconSrc, onClick, text }:
|
|
{
|
|
icon: string;
|
|
onClick: (e?: React.MouseEvent<Element, MouseEvent> | undefined) => void;
|
|
text: string;
|
|
}
|
|
) => {
|
|
|
|
const icon = useCallback(props => (<img
|
|
src = { iconSrc }
|
|
{ ...props } />), [ iconSrc ]);
|
|
|
|
return (
|
|
<ContextMenuItem
|
|
accessibilityLabel = { text }
|
|
icon = { icon }
|
|
onClick = { onClick }
|
|
text = { text } />
|
|
);
|
|
};
|
|
|
|
export default CustomOptionButton;
|