@@ -30,6 +30,7 @@ import {
3030 getClassLabel ,
3131} from "../common/commonFormatAttributes" ;
3232import { TailwindColorType , TailwindSettings } from "types" ;
33+ import { MinimalFillsTrait , Paint } from "../api_types" ;
3334
3435const isNotEmpty = ( s : string ) => s !== "" && s !== null && s !== undefined ;
3536const dropEmptyStrings = ( strings : string [ ] ) => strings . filter ( isNotEmpty ) ;
@@ -92,7 +93,7 @@ export class TailwindDefaultBuilder {
9293 }
9394
9495 commonShapeStyles ( ) : this {
95- this . customColor ( ( this . node as MinimalFillsMixin ) . fills , "bg" ) ;
96+ this . customColor ( ( this . node as MinimalFillsTrait ) . fills , "bg" ) ;
9697 this . radius ( ) ;
9798 this . shadow ( ) ;
9899 this . border ( ) ;
@@ -113,7 +114,10 @@ export class TailwindDefaultBuilder {
113114 if ( "strokes" in this . node ) {
114115 const { isOutline, property } = tailwindBorderWidth ( this . node ) ;
115116 this . addAttributes ( property ) ;
116- this . customColor ( this . node . strokes , isOutline ? "outline" : "border" ) ;
117+ this . customColor (
118+ this . node . strokes as MinimalStrokesTrait ,
119+ isOutline ? "outline" : "border" ,
120+ ) ;
117121 }
118122
119123 return this ;
@@ -150,21 +154,16 @@ export class TailwindDefaultBuilder {
150154 * example: text-opacity-25
151155 * example: bg-blue-500
152156 */
153- customColor (
154- paint : ReadonlyArray < Paint > | PluginAPI [ "mixed" ] ,
155- kind : TailwindColorType ,
156- ) : this {
157+ customColor ( paint : ReadonlyArray < Paint > , kind : TailwindColorType ) : this {
157158 if ( this . visible ) {
158159 let gradient = "" ;
159160 if ( kind === "bg" ) {
160161 gradient = tailwindGradientFromFills ( paint ) ;
161162
162163 // Add background blend mode class if applicable
163- if ( paint !== figma . mixed ) {
164- const blendModeClass = tailwindBackgroundBlendMode ( paint ) ;
165- if ( blendModeClass ) {
166- this . addAttributes ( blendModeClass ) ;
167- }
164+ const blendModeClass = tailwindBackgroundBlendMode ( paint ) ;
165+ if ( blendModeClass ) {
166+ this . addAttributes ( blendModeClass ) ;
168167 }
169168 }
170169 if ( gradient ) {
0 commit comments