Download frontend/node_modules/tailwind-merge/src/lib/from-theme.ts from netzkontrast/rag-context-optimizer: direct link, hf CLI and curl.
- Browser
- Download file 624 Bytes
-
https://huggingface.co/spaces/netzkontrast/rag-context-optimizer/resolve/main/frontend/node_modules/tailwind-merge/src/lib/from-theme.ts
- Command line
-
hf download hf://spaces/netzkontrast/rag-context-optimizer/frontend/node_modules/tailwind-merge/src/lib/from-theme.ts
-
curl -L -o from-theme.ts https://huggingface.co/spaces/netzkontrast/rag-context-optimizer/resolve/main/frontend/node_modules/tailwind-merge/src/lib/from-theme.ts
624 Bytes
| import { DefaultThemeGroupIds, NoInfer, ThemeGetter, ThemeObject } from './types' | |
| const fallbackThemeArr: ThemeObject<DefaultThemeGroupIds>[DefaultThemeGroupIds] = [] | |
| export const fromTheme = < | |
| AdditionalThemeGroupIds extends string = never, | |
| DefaultThemeGroupIdsInner extends string = DefaultThemeGroupIds, | |
| >( | |
| key: NoInfer<DefaultThemeGroupIdsInner | AdditionalThemeGroupIds>, | |
| ): ThemeGetter => { | |
| const themeGetter = (theme: ThemeObject<DefaultThemeGroupIdsInner | AdditionalThemeGroupIds>) => | |
| theme[key] || fallbackThemeArr | |
| themeGetter.isThemeGetter = true as const | |
| return themeGetter | |
| } | |