[MM-61593] Add parameters for icon/dropdown text for the Calls button (#31654)
* [MM-61593] Add parameters for icon/dropdown text for the Calls button * PR feedback
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c5f79bba09
Коммит
1efc3dacaf
@@ -75,6 +75,7 @@ const MobileChannelHeaderPlugins = (props: Props): JSX.Element => {
|
||||
id={'mobileChannelHeaderItem' + plug.id}
|
||||
onClick={handlePluginButtonClick}
|
||||
labels={<span>{plug.dropdownText}</span>}
|
||||
leadingElement={plug.icon}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -299,14 +299,20 @@ export default class PluginRegistry {
|
||||
'button',
|
||||
'dropdownButton',
|
||||
'action',
|
||||
'icon',
|
||||
'dropdownText',
|
||||
], ({
|
||||
button,
|
||||
dropdownButton,
|
||||
action,
|
||||
icon,
|
||||
dropdownText,
|
||||
}: {
|
||||
button: ReactResolvable;
|
||||
dropdownButton: ReactResolvable;
|
||||
action: CallButtonAction['action'];
|
||||
icon: ReactResolvable;
|
||||
dropdownText: ReactResolvable;
|
||||
}) => {
|
||||
const id = generateId();
|
||||
|
||||
@@ -315,7 +321,8 @@ export default class PluginRegistry {
|
||||
pluginId: this.id,
|
||||
button: resolveReactElement(button),
|
||||
dropdownButton: resolveReactElement(dropdownButton),
|
||||
icon: null, // Needed to satisfy types for MobileChannelHeaderButton
|
||||
icon: resolveReactElement(icon),
|
||||
dropdownText: resolveReactElement(dropdownText),
|
||||
action,
|
||||
};
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user