Change HeaderIconWrapper so that it get its icon passed as a children instead of a props (#28723)
Signed-off-by: Nicolas Le Cam <niko.lecam@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
d5ce06e580
Коммит
63c97f5a6d
@@ -198,13 +198,14 @@ class ChannelHeaderPlug extends React.PureComponent<ChannelHeaderPlugProps, Chan
|
||||
<HeaderIconWrapper
|
||||
key={'channelHeaderButton' + plug.id}
|
||||
buttonClass='channel-header__icon'
|
||||
iconComponent={plug.icon!}
|
||||
onClick={() => this.fireAction(plug.action!)}
|
||||
buttonId={plug.id + 'ChannelHeaderButton'}
|
||||
tooltip={plug.tooltipText ?? plug.dropdownText ?? ''}
|
||||
ariaLabelOverride={ariaLabel}
|
||||
pluginId={plug.pluginId}
|
||||
/>
|
||||
>
|
||||
{plug.icon}
|
||||
</HeaderIconWrapper>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -265,17 +266,16 @@ class ChannelHeaderPlug extends React.PureComponent<ChannelHeaderPlugProps, Chan
|
||||
<HeaderIconWrapper
|
||||
key={`channelHeaderButton_${binding.app_id}_${binding.location}`}
|
||||
buttonClass='channel-header__icon style--none'
|
||||
iconComponent={(
|
||||
<img
|
||||
src={binding.icon}
|
||||
width='24'
|
||||
height='24'
|
||||
/>
|
||||
)}
|
||||
onClick={() => this.onBindingClick(binding)}
|
||||
buttonId={`${binding.app_id}_${binding.location}`}
|
||||
tooltip={binding.label}
|
||||
/>
|
||||
>
|
||||
<img
|
||||
src={binding.icon}
|
||||
width='24'
|
||||
height='24'
|
||||
/>
|
||||
</HeaderIconWrapper>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user