({
shape,
direction,
from,
via,
to,
}: {
shape: string
direction: string
from: string
via?: string
to: string
})
| 1 | export function generateTailwindGradient({ |
| 2 | shape, |
| 3 | direction, |
| 4 | from, |
| 5 | via, |
| 6 | to, |
| 7 | }: { |
| 8 | shape: string |
| 9 | direction: string |
| 10 | from: string |
| 11 | via?: string |
| 12 | to: string |
| 13 | }): string { |
| 14 | const formattedDirection = direction.replace(/\s+/g, '_') |
| 15 | const viaClass = via ? `via-[${via}]` : '' |
| 16 | return `bg-[radial-gradient(${shape}_at_${formattedDirection},_var(--tw-gradient-stops))] from-[${from}] ${viaClass} to-[${to}]` |
| 17 | } |
| 18 | |
| 19 | export function generateCssGradient({ |
| 20 | shape, |
no outgoing calls
no test coverage detected