diff --git a/webapp/channels/src/components/channel_header/__snapshots__/channel_header.test.tsx.snap b/webapp/channels/src/components/channel_header/__snapshots__/channel_header.test.tsx.snap
index 1e9d230769..5361f1d1fb 100644
--- a/webapp/channels/src/components/channel_header/__snapshots__/channel_header.test.tsx.snap
+++ b/webapp/channels/src/components/channel_header/__snapshots__/channel_header.test.tsx.snap
@@ -74,14 +74,13 @@ exports[`components/ChannelHeader should match snapshot with last active display
- }
onClick={[Function]}
tooltip="Channel files"
- />
+ >
+
+
- }
onClick={[Function]}
tooltip="Channel files"
- />
+ >
+
+
-
-
- -
-
-
- }
onClick={[Function]}
tooltip="Members"
- />
+ >
+
+
+ -
+
+
- }
onClick={[Function]}
tooltip="Channel files"
- />
+ >
+
+
-
-
- -
-
-
- }
onClick={[Function]}
tooltip="Members"
- />
+ >
+
+
+ -
+
+
- }
onClick={[Function]}
tooltip="Channel files"
- />
+ >
+
+
-
-
- -
-
-
- }
onClick={[Function]}
tooltip="Members"
- />
+ >
+
+
+ -
+
+
- }
onClick={[Function]}
tooltip="Channel files"
- />
+ >
+
+
-
-
- -
-
-
- }
onClick={[Function]}
tooltip="Members"
- />
+ >
+
+
+ -
+
+
- }
onClick={[Function]}
tooltip="Channel files"
- />
+ >
+
+
-
-
- -
-
-
- }
onClick={[Function]}
tooltip="Members"
- />
+ >
+
+
+ -
+
+
- }
onClick={[Function]}
tooltip="Channel files"
- />
+ >
+
+
-
-
- -
-
-
- }
onClick={[Function]}
tooltip="Members"
- />
+ >
+
+
+ -
+
+
- }
onClick={[Function]}
tooltip="Channel files"
- />
+ >
+
+
-
-
- -
-
-
- }
onClick={[Function]}
tooltip="Members"
- />
+ >
+
+
+ -
+
+
- }
onClick={[Function]}
tooltip="Channel files"
- />
+ >
+
+
- }
onClick={[Function]}
tooltip="Channel files"
- />
+ >
+
+
- }
onClick={[Function]}
tooltip="Channel files"
- />
+ >
+
+
-
-
- -
-
-
- }
onClick={[Function]}
tooltip="Members"
- />
+ >
+
+
+ -
+
+
- }
onClick={[Function]}
tooltip="Channel files"
- />
+ >
+
+
-
-
- -
-
-
- }
onClick={[Function]}
tooltip="Members"
- />
+ >
+
+
+ -
+
+
- }
onClick={[Function]}
tooltip="Channel files"
- />
+ >
+
+
-
-
- -
-
-
- }
onClick={[Function]}
tooltip="Members"
- />
+ >
+
+
+ -
+
+
- }
onClick={[Function]}
tooltip="Channel files"
- />
+ >
+
+
-
-
- -
-
-
- }
onClick={[Function]}
tooltip="Members"
- />
+ >
+
+
+ -
+
+
- }
onClick={[Function]}
tooltip="Channel files"
- />
+ >
+
+
-
-
- -
-
-
- }
onClick={[Function]}
tooltip="Members"
- />
+ >
+
+
+ -
+
+
-
-
- 2
-
-
- }
onClick={[Function]}
tooltip="Pinned messages"
- />
+ >
+
+
+ 2
+
+
- }
onClick={[Function]}
tooltip="Channel files"
- />
+ >
+
+
{
const pinnedButton = this.props.pinnedPostsCount ? (
+ >
+ {pinnedIcon}
+
) : (
null
);
@@ -421,12 +422,13 @@ class ChannelHeader extends React.PureComponent
{
memberListButton = (
+ >
+ {membersIcon}
+
);
}
@@ -614,12 +616,13 @@ class ChannelHeader extends React.PureComponent {
{pinnedButton}
{this.props.isFileAttachmentsEnabled &&
+ >
+ {channelFilesIcon}
+
}
{headerTextContainer}
diff --git a/webapp/channels/src/components/channel_header/channel_info_button.tsx b/webapp/channels/src/components/channel_header/channel_info_button.tsx
index d7b3a70f33..044dfbfd2c 100644
--- a/webapp/channels/src/components/channel_header/channel_info_button.tsx
+++ b/webapp/channels/src/components/channel_header/channel_info_button.tsx
@@ -67,9 +67,10 @@ const ChannelInfoButton = ({channel}: Props) => {
buttonClass={buttonClass}
buttonId='channel-info-btn'
onClick={toggleRHS}
- iconComponent={}
tooltip={tooltip}
- />
+ >
+
+
);
};
diff --git a/webapp/channels/src/components/channel_header/components/header_icon_wrapper.test.tsx b/webapp/channels/src/components/channel_header/components/header_icon_wrapper.test.tsx
index 86dc064b99..679e175e0a 100644
--- a/webapp/channels/src/components/channel_header/components/header_icon_wrapper.test.tsx
+++ b/webapp/channels/src/components/channel_header/components/header_icon_wrapper.test.tsx
@@ -17,7 +17,7 @@ describe('components/channel_header/components/HeaderIconWrapper', () => {
);
const baseProps = {
- iconComponent: mentionsIcon,
+ children: mentionsIcon,
buttonClass: 'button_class',
buttonId: 'button_id',
onClick: jest.fn(),
diff --git a/webapp/channels/src/components/channel_header/components/header_icon_wrapper.tsx b/webapp/channels/src/components/channel_header/components/header_icon_wrapper.tsx
index 4bd6ef2ae8..c7d8b8935e 100644
--- a/webapp/channels/src/components/channel_header/components/header_icon_wrapper.tsx
+++ b/webapp/channels/src/components/channel_header/components/header_icon_wrapper.tsx
@@ -19,7 +19,7 @@ type Props = {
buttonClass?: string;
buttonId: string;
- iconComponent: React.ReactNode;
+ children: React.ReactNode;
onClick: (event: React.MouseEvent) => void;
tooltip: string;
tooltipShortcut?: ShortcutDefinition;
@@ -32,7 +32,7 @@ const HeaderIconWrapper = (props: Props) => {
ariaLabelOverride,
buttonClass,
buttonId,
- iconComponent,
+ children,
onClick,
tooltip: tooltipText,
tooltipShortcut,
@@ -58,7 +58,7 @@ const HeaderIconWrapper = (props: Props) => {
className={buttonClass || 'channel-header__icon'}
onClick={onClick}
>
- {iconComponent}
+ {children}
{boardsEnabled &&
diff --git a/webapp/channels/src/components/search/search.tsx b/webapp/channels/src/components/search/search.tsx
index 085e93b40b..0e122162c7 100644
--- a/webapp/channels/src/components/search/search.tsx
+++ b/webapp/channels/src/components/search/search.tsx
@@ -382,12 +382,6 @@ const Search: React.FC = (props: Props): JSX.Element => {
const renderMentionButton = (): JSX.Element => (
- }
buttonClass={classNames(
'channel-header__icon',
{'channel-header__icon--active': props.isMentionSearch},
@@ -397,14 +391,16 @@ const Search: React.FC = (props: Props): JSX.Element => {
tooltip={intl.formatMessage({id: 'channel_header.recentMentions', defaultMessage: 'Recent mentions'})}
tooltipShortcut={mentionsShortcut}
isRhsOpen={props.isRhsOpen}
- />
+ >
+
+
);
const renderFlagBtn = (): JSX.Element => (
- }
buttonClass={classNames(
'channel-header__icon ',
{'channel-header__icon--active': props.isFlaggedPosts},
@@ -413,7 +409,9 @@ const Search: React.FC = (props: Props): JSX.Element => {
onClick={getFlagged}
tooltip={intl.formatMessage({id: 'channel_header.flagged', defaultMessage: 'Saved messages'})}
isRhsOpen={props.isRhsOpen}
- />
+ >
+
+
);
const renderHintPopover = (): JSX.Element => {
@@ -500,16 +498,15 @@ const Search: React.FC = (props: Props): JSX.Element => {
if (hideSearchBar) {
return (
- }
buttonId={'channelHeaderSearchButton'}
onClick={searchButtonClick}
tooltip={intl.formatMessage({id: 'channel_header.search', defaultMessage: 'Search'})}
- />
+ >
+
+
);
}
diff --git a/webapp/channels/src/plugins/channel_header_plug/channel_header_plug.tsx b/webapp/channels/src/plugins/channel_header_plug/channel_header_plug.tsx
index 0f7bc0103b..a23d4e2fb6 100644
--- a/webapp/channels/src/plugins/channel_header_plug/channel_header_plug.tsx
+++ b/webapp/channels/src/plugins/channel_header_plug/channel_header_plug.tsx
@@ -198,13 +198,14 @@ class ChannelHeaderPlug extends React.PureComponent this.fireAction(plug.action!)}
buttonId={plug.id + 'ChannelHeaderButton'}
tooltip={plug.tooltipText ?? plug.dropdownText ?? ''}
ariaLabelOverride={ariaLabel}
pluginId={plug.pluginId}
- />
+ >
+ {plug.icon}
+
);
};
@@ -265,17 +266,16 @@ class ChannelHeaderPlug extends React.PureComponent
- )}
onClick={() => this.onBindingClick(binding)}
buttonId={`${binding.app_id}_${binding.location}`}
tooltip={binding.label}
- />
+ >
+
+
);
};