Skip to content

Commit

Permalink
misc(ChartHeader): set some attributes as optional (#1722)
Browse files Browse the repository at this point in the history
  • Loading branch information
ansmonjol authored Sep 9, 2024
1 parent 6d3f5c4 commit 4b29b17
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/components/designSystem/graphs/ChartHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { theme } from '~/styles'

type ChartHeaderProps = {
name: string
tooltipText: string
tooltipText?: string
amount: string
period: string
period?: string
blur?: boolean
loading?: boolean
}
Expand All @@ -35,18 +35,22 @@ const ChartHeader = ({
<Typography variant="captionHl" color="grey600">
{name}
</Typography>
<LeftInfoCellTooltip placement="top-start" title={tooltipText}>
<Icon name="info-circle" />
</LeftInfoCellTooltip>
{!!tooltipText && (
<LeftInfoCellTooltip placement="top-start" title={tooltipText}>
<Icon name="info-circle" />
</LeftInfoCellTooltip>
)}
</LeftInfoCellWithTooltip>
<Typography variant="subhead" color="grey700">
{amount}
</Typography>
</LeftInfosWrapper>

<Typography variant="note" color="grey600">
{period}
</Typography>
{!!period && (
<Typography variant="note" color="grey600">
{period}
</Typography>
)}
</ChartHeaderWrapper>
)}
</>
Expand Down

0 comments on commit 4b29b17

Please sign in to comment.