( this: MacroContext | void, color: string, type = 'backgroundColor', size: any = 20 )
| 16 | } |
| 17 | |
| 18 | export function colorSwatch( |
| 19 | this: MacroContext | void, |
| 20 | color: string, |
| 21 | type = 'backgroundColor', |
| 22 | size: any = 20 |
| 23 | ): string { |
| 24 | // @ts-ignore |
| 25 | return style.call(this, { |
| 26 | '--v': {type, value: color}, |
| 27 | backgroundColor: '--v', |
| 28 | width: size, |
| 29 | aspectRatio: 'square', |
| 30 | borderRadius: 'sm', |
| 31 | borderWidth: 1, |
| 32 | borderColor: 'gray-1000/15', |
| 33 | borderStyle: 'solid', |
| 34 | forcedColorAdjust: 'none' |
| 35 | }); |
| 36 | } |
| 37 | |
| 38 | /** |
| 39 | * Gets the RGB values for a color token. |
no outgoing calls
no test coverage detected