({
shape,
position,
fromColor,
viaColor,
toColor,
}: {
shape: string
position: string
fromColor: string
viaColor?: string
toColor: string
})
| 17 | } |
| 18 | |
| 19 | export function generateCssGradient({ |
| 20 | shape, |
| 21 | position, |
| 22 | fromColor, |
| 23 | viaColor, |
| 24 | toColor, |
| 25 | }: { |
| 26 | shape: string |
| 27 | position: string |
| 28 | fromColor: string |
| 29 | viaColor?: string |
| 30 | toColor: string |
| 31 | }): string { |
| 32 | const gradientStops = viaColor |
| 33 | ? `${fromColor}, ${viaColor}, ${toColor}` |
| 34 | : `${fromColor}, ${toColor}` |
| 35 | return `radial-gradient(${shape} at ${position}, ${gradientStops})` |
| 36 | } |
no outgoing calls
no test coverage detected