Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
13 lines
517 B
Text
13 lines
517 B
Text
import { DefaultThemeGroupIds, NoInfer, ThemeGetter, ThemeObject } from './types'
|
|
|
|
export const fromTheme = <
|
|
AdditionalThemeGroupIds extends string = never,
|
|
DefaultThemeGroupIdsInner extends string = DefaultThemeGroupIds,
|
|
>(key: NoInfer<DefaultThemeGroupIdsInner | AdditionalThemeGroupIds>): ThemeGetter => {
|
|
const themeGetter = (theme: ThemeObject<DefaultThemeGroupIdsInner | AdditionalThemeGroupIds>) =>
|
|
theme[key] || []
|
|
|
|
themeGetter.isThemeGetter = true as const
|
|
|
|
return themeGetter
|
|
}
|