mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-12 18:47:45 +00:00
fix(ui) Add min width to the usage stats component (#10056)
This commit is contained in:
parent
7315e6c40d
commit
36e12f7524
@ -49,7 +49,12 @@ export default function FieldUsageStats({ expandedField }: Props) {
|
|||||||
<SectionHeader>Usage</SectionHeader>
|
<SectionHeader>Usage</SectionHeader>
|
||||||
<UsageBarWrapper>
|
<UsageBarWrapper>
|
||||||
<UsageBarBackground>
|
<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>
|
</UsageBarBackground>
|
||||||
<UsageTextWrapper>{relevantUsageStats.count || 0} queries / month</UsageTextWrapper>
|
<UsageTextWrapper>{relevantUsageStats.count || 0} queries / month</UsageTextWrapper>
|
||||||
</UsageBarWrapper>
|
</UsageBarWrapper>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user