Skip to content

Commit 609f211

Browse files
committed
Fix button color
1 parent ab8463e commit 609f211

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

packages/mdx/src/mini-editor/editor-frame.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,12 @@ export const EditorFrame = React.forwardRef<
6868
...style,
6969
}}
7070
>
71-
<div className={"ch-frame-title-bar"}>
71+
<div
72+
className={"ch-frame-title-bar"}
73+
style={{
74+
color: getColor(theme, ColorName.IconForeground),
75+
}}
76+
>
7277
<TabsContainer
7378
tabs={northPanel.tabs}
7479
showFrameButtons={true}
@@ -89,6 +94,10 @@ export const EditorFrame = React.forwardRef<
8994
className={"ch-frame-title-bar"}
9095
style={{
9196
transform: southPanel.style?.transform,
97+
color: getColor(
98+
theme,
99+
ColorName.IconForeground
100+
),
92101
}}
93102
>
94103
<TabsContainer

packages/mdx/src/utils/theme.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export enum ColorName {
4545
InputBackground,
4646
InputBorder,
4747
SelectionBackground,
48+
IconForeground,
4849
}
4950

5051
type Color = string | undefined
@@ -200,6 +201,15 @@ export function getColor(
200201
hc: "#f3f518",
201202
})
202203
)
204+
case ColorName.IconForeground:
205+
return (
206+
colors["icon.foreground"] ||
207+
getDefault(theme, {
208+
dark: "#C5C5C5",
209+
light: "#424242",
210+
hc: "#FFFFFF",
211+
})
212+
)
203213
default:
204214
return "#f00"
205215
}

0 commit comments

Comments
 (0)