Fix color of quotes in chats with custom colors

This commit is contained in:
trevor-signal 2024-12-19 14:13:22 -05:00 committed by GitHub
parent d4b0ae25c1
commit 187d06fd69
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 35 additions and 12 deletions

View file

@ -7,7 +7,7 @@ import { getHSL } from './getHSL';
import { getUserTheme } from '../shims/getUserTheme';
type ExtraQuotePropsType = {
borderLeftColor?: string;
borderInlineStartColor?: string;
};
type BackgroundPropertyType =
@ -18,7 +18,7 @@ type BackgroundPropertyType =
export function getCustomColorStyle(
color?: CustomColorType,
isQuote = false
): BackgroundPropertyType {
): (BackgroundPropertyType & ExtraQuotePropsType) | undefined {
if (!color) {
return undefined;
}
@ -33,7 +33,7 @@ export function getCustomColorStyle(
if (theme === ThemeType.dark) {
adjustedLightness = -0.4;
}
extraQuoteProps.borderLeftColor = getHSL(color.start);
extraQuoteProps.borderInlineStartColor = getHSL(color.start);
}
if (!color.end) {