Skip to content
Snippets Groups Projects
Unverified Commit aaedddf8 authored by Phoomparin Mano's avatar Phoomparin Mano Committed by GitHub
Browse files

feat(sdk): add background-disabled color (#49900)

* add background-disabled color

* expect background-disabled to be mapped in tests
parent 4aaa13a8
No related branches found
No related tags found
No related merge requests found
......@@ -49,6 +49,9 @@ const theme = defineEmbeddingSdkTheme({
// Slightly darker background color used for hover and accented elements
"background-hover": "#F9FBFC",
// Muted background color used for disabled elements, such as disabled buttons and inputs.
"background-disabled": "#F3F5F7",
// Color used for borders
border: "#EEECEC",
......
......@@ -43,16 +43,10 @@ export const SDK_TO_MAIN_APP_COLORS_MAPPING: Record<
"text-tertiary": ["text-light", "text-tertiary"],
background: ["bg-white", "background"],
"background-hover": ["bg-light"],
"background-disabled": ["background-disabled"],
shadow: ["shadow"],
positive: ["success"],
negative: ["danger"],
// positive: "success",
// negative: "danger",
// warning: "warning",
// white
// black
};
const originalColors = { ...colors };
......
......@@ -16,6 +16,7 @@ describe("Transform Embedding Theme Override", () => {
brand: "hotpink",
"text-primary": "yellow",
"text-tertiary": "green",
"background-disabled": "pink",
},
},
"Roboto",
......@@ -30,6 +31,7 @@ describe("Transform Embedding Theme Override", () => {
"text-primary": expect.arrayContaining(["yellow"]),
"text-light": expect.arrayContaining(["green"]),
"text-tertiary": expect.arrayContaining(["green"]),
"background-disabled": expect.arrayContaining(["pink"]),
},
other: {
fontSize: "2rem",
......
......@@ -51,6 +51,9 @@ export interface MetabaseColors {
/** Slightly darker background color used for hover and accented elements. */
"background-hover"?: string;
/** Muted background color used for disabled elements, such as disabled buttons and inputs. */
"background-disabled"?: string;
/** Color used for borders */
border?: string;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment