Parcourir la source

fix: custom portal color on previews

Konstantinos Kaloutas il y a 2 ans
Parent
commit
bdcf0740d2

+ 3 - 1
tldraw/apps/tldraw-logseq/src/lib/shapes/LogseqPortalShape.tsx

@@ -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')}