fix: replace invalid theme tokens

This commit is contained in:
Enzo Martellucci
2025-05-07 20:52:18 +02:00
parent 2c038f5bd6
commit d635c2a9ab
3 changed files with 10 additions and 11 deletions

View File

@@ -38,11 +38,11 @@ import { useOverflowDetection } from './useOverflowDetection';
const MetricNameText = styled.div<{ metricNameFontSize?: number }>`
${({ theme, metricNameFontSize }) => `
font-family: ${theme.typography.families.sansSerif};
font-weight: ${theme.typography.weights.normal};
font-size: ${metricNameFontSize || theme.typography.sizes.s * 2}px;
font-family: ${theme.fontFamily};
font-weight: ${theme.fontWeightNormal};
font-size: ${metricNameFontSize || theme.fontSizeSM * 2}px;
text-align: center;
margin-bottom: ${theme.gridUnit * 3}px;
margin-bottom: ${theme.sizeUnit * 3}px;
`}
`;

View File

@@ -396,7 +396,7 @@ class BigNumberVis extends PureComponent<BigNumberVizProps, BigNumberVisState> {
}
getTotalElementsHeight() {
const marginPerElement = 8; // theme.gridUnit = 4, so margin-bottom = 8px
const marginPerElement = 8; // theme.sizeUnit = 4, so margin-bottom = 8px
const refs = [
this.metricNameRef,
@@ -546,12 +546,12 @@ export default styled(BigNumberVis)`
.kicker {
line-height: 1em;
margin-bottom: ${theme.gridUnit * 2}px;
margin-bottom: ${theme.sizeUnit * 2}px;
}
.metric-name {
line-height: 1em;
margin-bottom: ${theme.gridUnit * 2}px;
margin-bottom: ${theme.sizeUnit * 2}px;
}
.header-line {
@@ -567,12 +567,12 @@ export default styled(BigNumberVis)`
.subheader-line {
line-height: 1em;
margin-bottom: ${theme.gridUnit * 2}px;
margin-bottom: ${theme.sizeUnit * 2}px;
}
.subtitle-line {
line-height: 1em;
margin-bottom: ${theme.gridUnit * 2}px;
margin-bottom: ${theme.sizeUnit * 2}px;
}
&.is-fallback-value {