Skip to content

Commit

Permalink
chore(home): add title to tab badges
Browse files Browse the repository at this point in the history
to display the full number of videos when the number exceeds 99+
  • Loading branch information
AXeL-dev committed Jul 30, 2022
1 parent a6eab93 commit aea4e5f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/ui/components/pages/Home/Tab/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,16 @@ export default function Tab(props: TabProps) {
label={
<Box sx={{ display: 'flex', alignItems: 'center' }}>
{label}
{badge && selected ? <Badge badgeContent={badge} /> : null}
{badge && selected ? (
<Badge
badgeContent={badge}
title={
['number', 'string'].includes(typeof badge)
? (badge as string)
: ''
}
/>
) : null}
</Box>
}
disableRipple
Expand Down

0 comments on commit aea4e5f

Please sign in to comment.