Skip to content

Commit a53710e

Browse files
committed
fix : logic fix
1 parent 6876713 commit a53710e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib/convertToTailwind.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ export function generateTailwindGradient({
1111
via: string;
1212
to: string;
1313
}): string {
14-
return `bg-[radial-gradient(${shape}_at_${direction},_var(--tw-gradient-stops))] from-[${from}] via-[${via}] to-[${to}]`;
14+
const formattedDirection = direction.replace(/\s+/g, '_');
15+
return `bg-[radial-gradient(${shape}_at_${formattedDirection},_var(--tw-gradient-stops))] from-[${from}] via-[${via}] to-[${to}]`;
1516
}
1617

1718

0 commit comments

Comments
 (0)