* Get the appropriate theme name based on detected Tailwind version. * For TW3 projects, appends '-tw3' to use the legacy theme variant.
( baseTheme: string, twVersion: 3 | 4 | null )
| 65 | * For TW3 projects, appends '-tw3' to use the legacy theme variant. |
| 66 | */ |
| 67 | function getThemeNameForTailwindVersion( |
| 68 | baseTheme: string, |
| 69 | twVersion: 3 | 4 | null |
| 70 | ): string { |
| 71 | // If TW3 is detected, use the -tw3 variant |
| 72 | if (twVersion === 3) { |
| 73 | return `${baseTheme}-tw3` |
| 74 | } |
| 75 | // For TW4 or unknown, use the default (TW4) theme |
| 76 | return baseTheme |
| 77 | } |
| 78 | |
| 79 | /** |
| 80 | * Check if a theme is a TW3 variant (ends with -tw3) |