Skip to content

Commit

Permalink
fix(ui) Add min width to the usage stats component (datahub-project#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscollins3456 authored and sleeperdeep committed Jun 25, 2024
1 parent 22ea419 commit cfbe3d6
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ export default function FieldUsageStats({ expandedField }: Props) {
<SectionHeader>Usage</SectionHeader>
<UsageBarWrapper>
<UsageBarBackground>
<UsageBar width={((relevantUsageStats.count || 0) / maxFieldUsageCount) * USAGE_BAR_MAX_WIDTH} />
<UsageBar
width={Math.max(
((relevantUsageStats.count || 0) / maxFieldUsageCount) * USAGE_BAR_MAX_WIDTH,
4,
)}
/>
</UsageBarBackground>
<UsageTextWrapper>{relevantUsageStats.count || 0} queries / month</UsageTextWrapper>
</UsageBarWrapper>
Expand Down

0 comments on commit cfbe3d6

Please sign in to comment.