Fix color of quotes in chats with custom colors
This commit is contained in:
parent
d4b0ae25c1
commit
187d06fd69
5 changed files with 35 additions and 12 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue