Skip to content

Commit f4365a5

Browse files
authored
fix: replace hardcoded fontSize in typeBadge and spread bodySmall in sectionHeader (#59)
1 parent 0406414 commit f4365a5

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

src/components/StreamInfoPanel.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,15 @@ export const StreamInfoPanel: React.FC<StreamInfoPanelProps> = ({ fieldNames, fi
5757
</div>
5858
<div className={styles.statItem}>
5959
<span className={styles.statLabel}>Ingested</span>
60-
<span className={styles.statValue}>{stats.ingestion?.size ? sanitizeBytes(stats.ingestion.size) : '-'}</span>
60+
<span className={styles.statValue}>
61+
{stats.ingestion?.size ? sanitizeBytes(stats.ingestion.size) : '-'}
62+
</span>
6163
</div>
6264
<div className={styles.statItem}>
6365
<span className={styles.statLabel}>Stored</span>
64-
<span className={styles.statValue}>{stats.storage?.size ? sanitizeBytes(stats.storage.size) : '-'}</span>
66+
<span className={styles.statValue}>
67+
{stats.storage?.size ? sanitizeBytes(stats.storage.size) : '-'}
68+
</span>
6569
</div>
6670
</div>
6771
)}
@@ -124,11 +128,10 @@ const getStyles = (theme: GrafanaTheme2) => ({
124128
gap: theme.spacing(0.5),
125129
padding: `${theme.spacing(0.5)} ${theme.spacing(1)}`,
126130
cursor: 'pointer',
127-
fontSize: theme.typography.bodySmall.fontSize,
131+
...theme.typography.bodySmall,
128132
fontWeight: theme.typography.fontWeightMedium,
129133
color: theme.colors.text.secondary,
130134
textTransform: 'uppercase' as const,
131-
letterSpacing: '0.5px',
132135
userSelect: 'none' as const,
133136
'&:hover': {
134137
background: theme.colors.action.hover,
@@ -165,7 +168,7 @@ const getStyles = (theme: GrafanaTheme2) => ({
165168
}),
166169
typeBadge: css({
167170
fontFamily: theme.typography.fontFamilyMonospace,
168-
fontSize: '10px',
171+
fontSize: theme.typography.bodySmall.fontSize,
169172
fontWeight: theme.typography.fontWeightBold,
170173
width: 20,
171174
textAlign: 'center' as const,

0 commit comments

Comments
 (0)