[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}
|
id={'mobileChannelHeaderItem' + plug.id}
|
||||||
onClick={handlePluginButtonClick}
|
onClick={handlePluginButtonClick}
|
||||||
labels={<span>{plug.dropdownText}</span>}
|
labels={<span>{plug.dropdownText}</span>}
|
||||||
|
leadingElement={plug.icon}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -299,14 +299,20 @@ export default class PluginRegistry {
|
|||||||
'button',
|
'button',
|
||||||
'dropdownButton',
|
'dropdownButton',
|
||||||
'action',
|
'action',
|
||||||
|
'icon',
|
||||||
|
'dropdownText',
|
||||||
], ({
|
], ({
|
||||||
button,
|
button,
|
||||||
dropdownButton,
|
dropdownButton,
|
||||||
action,
|
action,
|
||||||
|
icon,
|
||||||
|
dropdownText,
|
||||||
}: {
|
}: {
|
||||||
button: ReactResolvable;
|
button: ReactResolvable;
|
||||||
dropdownButton: ReactResolvable;
|
dropdownButton: ReactResolvable;
|
||||||
action: CallButtonAction['action'];
|
action: CallButtonAction['action'];
|
||||||
|
icon: ReactResolvable;
|
||||||
|
dropdownText: ReactResolvable;
|
||||||
}) => {
|
}) => {
|
||||||
const id = generateId();
|
const id = generateId();
|
||||||
|
|
||||||
@@ -315,7 +321,8 @@ export default class PluginRegistry {
|
|||||||
pluginId: this.id,
|
pluginId: this.id,
|
||||||
button: resolveReactElement(button),
|
button: resolveReactElement(button),
|
||||||
dropdownButton: resolveReactElement(dropdownButton),
|
dropdownButton: resolveReactElement(dropdownButton),
|
||||||
icon: null, // Needed to satisfy types for MobileChannelHeaderButton
|
icon: resolveReactElement(icon),
|
||||||
|
dropdownText: resolveReactElement(dropdownText),
|
||||||
action,
|
action,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user