MCPcopy Create free account
hub / github.com/formkit/formkit / getThemeNameForTailwindVersion

Function getThemeNameForTailwindVersion

packages/cli/src/theme.ts:67–77  ·  view source on GitHub ↗

* 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
)

Source from the content-addressed store, hash-verified

65 * For TW3 projects, appends '-tw3' to use the legacy theme variant.
66 */
67function 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)

Callers 1

buildThemeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected