Skip to content
Snippets Groups Projects
Commit 62ca675b authored by Oisin Coveney's avatar Oisin Coveney
Browse files

make sure that themes are respected

parent 33fb74e0
Branches
Tags
No related merge requests found
......@@ -3,6 +3,7 @@
*/
/* eslint-disable react/prop-types */
import cx from "classnames";
import { useMemo } from "react";
import { t } from "ttag";
import { Ellipsified } from "metabase/core/components/Ellipsified";
......@@ -34,13 +35,17 @@ const ScalarValue = ({ value }) => {
other: { number: numberTheme },
} = useMantineTheme();
const fontSize = useMemo(
() => numberTheme?.value?.fontSize,
[numberTheme?.value?.fontSize],
);
return (
<ScalarValueWrapper
className={cx(
DashboardS.ScalarValue,
DashboardS.ScalarValueElement,
QueryBuilderS.ScalarValue,
)}
className={cx(DashboardS.ScalarValue, QueryBuilderS.ScalarValue, {
[DashboardS.ScalarValueElement]: !fontSize,
})}
fontSize={fontSize}
lineHeight={numberTheme?.value?.lineHeight}
data-testid="scalar-value"
>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment