-
Denis Berezin authored
* Add proper brand colors to drills menu * Add theming for filters and drills * Fix css vars * Fix table css * Add SDK theme colors interface and remapping * Fix dashboard brand color issue * Fix theme colors interface * Fix default theme table cell background * Fix typo * Fix for qb filters panel custom border
Denis Berezin authored* Add proper brand colors to drills menu * Add theming for filters and drills * Fix css vars * Fix table css * Add SDK theme colors interface and remapping * Fix dashboard brand color issue * Fix theme colors interface * Fix default theme table cell background * Fix typo * Fix for qb filters panel custom border
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
get-embedding-theme.unit.spec.ts 929 B
import { DEFAULT_EMBEDDED_COMPONENT_THEME } from "embedding-sdk/lib/theme/default-component-theme";
import { getEmbeddingThemeOverride } from "./get-embedding-theme";
describe("Transform Embedding Theme Override", () => {
it("should transform MetabaseTheme to EmbeddingThemeOverride", () => {
const theme = getEmbeddingThemeOverride({
lineHeight: 1.5,
fontSize: "2rem",
fontFamily: "Roboto",
colors: {
brand: "hotpink",
"text-primary": "yellow",
"text-tertiary": "green",
},
});
expect(theme).toEqual({
lineHeight: 1.5,
fontFamily: "Roboto",
colors: {
brand: expect.arrayContaining(["hotpink"]),
"text-dark": expect.arrayContaining(["yellow"]),
"text-light": expect.arrayContaining(["green"]),
},
other: {
fontSize: "2rem",
...DEFAULT_EMBEDDED_COMPONENT_THEME,
},
});
});
});