fix: custom portal color on previews

This commit is contained in:
Konstantinos Kaloutas
2023-04-12 14:23:03 +03:00
committed by Tienson Qin
parent 17206d32c0
commit bdcf0740d2

View File

@@ -554,7 +554,9 @@ export class LogseqPortalShape extends TLBoxShape<LogseqPortalShapeProps> {
<rect
fill={
this.props.fill && this.props.fill !== 'var(--ls-secondary-background-color)'
? `var(--ls-highlight-color-${this.props.fill})`
? isBuiltInColor(this.props.fill)
? `var(--ls-highlight-color-${this.props.fill})`
: this.props.fill
: 'var(--ls-secondary-background-color)'
}
stroke={getComputedColor(this.props.fill, 'background')}