Skip to content

Commit 12dfeb0

Browse files
committed
fix: color
1 parent 0e87f88 commit 12dfeb0

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/components/editor/components/toolbar/selection-toolbar/actions/Color.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ function Color() {
1818
const { t } = useTranslation();
1919
const { visible: toolbarVisible } = useSelectionToolbarContext();
2020
const editor = useSlateStatic() as YjsEditor;
21-
const _isActivated = CustomEditor.isMarkActive(editor, EditorMarkFormat.FontColor);
2221
const marks = CustomEditor.getAllMarks(editor);
2322
const activeFontColor = marks.find((mark) => mark[EditorMarkFormat.FontColor])?.[EditorMarkFormat.FontColor];
2423

@@ -135,7 +134,7 @@ function Color() {
135134
<div
136135
className={`absolute top-0 left-0 h-full w-full cursor-pointer rounded-200 border opacity-50 hover:opacity-100`}
137136
style={{
138-
borderColor: activeFontColor === color.color ? 'var(--fill-default)' : undefined,
137+
borderColor: activeFontColor === color.color ? color.color : 'var(--background-tertiary)',
139138
color: renderColor(color.color) || 'var(--text-title)',
140139
opacity: color.color ? undefined : 1,
141140
}}

src/components/editor/components/toolbar/selection-toolbar/actions/ColorHighlight.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ function ColorHighlight() {
1919
const { t } = useTranslation();
2020
const { visible: toolbarVisible } = useSelectionToolbarContext();
2121
const editor = useSlateStatic() as YjsEditor;
22-
const _isActivated = CustomEditor.isMarkActive(editor, EditorMarkFormat.BgColor);
2322
const marks = CustomEditor.getAllMarks(editor);
2423
const activeBgColor = marks.find((mark) => mark[EditorMarkFormat.BgColor])?.[EditorMarkFormat.BgColor];
2524

@@ -143,7 +142,7 @@ function ColorHighlight() {
143142
</>
144143
) : (
145144
<div
146-
className="w-full h-full rounded-200 border border-tertiary"
145+
className="w-full h-full rounded-200 border border-background-tertiary"
147146
style={{
148147
backgroundColor: renderColor(color.color),
149148
}}

0 commit comments

Comments
 (0)