Skip to content

Commit

Permalink
fix(ui) Add min width to the usage stats component (#10056)
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscollins3456 authored Mar 22, 2024
1 parent 7315e6c commit 36e12f7
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 36e12f7

Please sign in to comment.