Skip to content

Commit

Permalink
Re-add icon back to InfoPanelTitle
Browse files Browse the repository at this point in the history
  • Loading branch information
rique223 committed Sep 26, 2023
1 parent 6e2f2ad commit 55810be
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions apps/meteor/client/components/InfoPanel/InfoPanelTitle.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Box } from '@rocket.chat/fuselage';
// import type { Keys as IconName } from '@rocket.chat/icons';
import { Box, Icon } from '@rocket.chat/fuselage';
import type { Keys as IconName } from '@rocket.chat/icons';
import type { FC, ReactNode } from 'react';
import React from 'react';

Expand All @@ -8,11 +8,11 @@ type InfoPanelTitleProps = {
icon?: ReactNode;
};

// const isValidIcon = (icon: ReactNode): icon is IconName => typeof icon === 'string';
const isValidIcon = (icon: ReactNode): icon is IconName => typeof icon === 'string';

const InfoPanelTitle: FC<InfoPanelTitleProps> = ({ title }) => (
const InfoPanelTitle: FC<InfoPanelTitleProps> = ({ title, icon }) => (
<Box display='flex' flexShrink={0} alignItems='center' fontScale='p1m' color='default' withTruncatedText>
{/* {isValidIcon(icon) ? <Icon name={icon} size='x22' /> : icon} */}
{isValidIcon(icon) ? <Icon name={icon} size='x22' /> : icon}
<Box withTruncatedText title={title}>
{title}
</Box>
Expand Down

0 comments on commit 55810be

Please sign in to comment.