diff --git a/packages/glaze/src/useStyling.ts b/packages/glaze/src/useStyling.ts index c0701ad..d1b76a6 100644 --- a/packages/glaze/src/useStyling.ts +++ b/packages/glaze/src/useStyling.ts @@ -3,7 +3,7 @@ import { CSSProperties } from 'react'; import { useStyles } from 'react-treat'; import { ThemeOrAny } from 'treat/theme'; -import { ValueOf } from 'type-fest'; +import { LiteralUnion, ValueOf } from 'type-fest'; import { Tokens } from './theme'; import { useTheme } from './ThemeContext'; @@ -21,12 +21,15 @@ type ResolveAlias< ? ResolveShorthand : ThemeOrAny['aliases'][T]; -type ScaleKeys = Extract< - keyof ThemeOrAny['scales'][ThemeOrAny['matchers'][Extract< - Property, - Tokens<'matchers'> - >]], - ValueOf +type ScaleKeys = LiteralUnion< + Extract< + keyof ThemeOrAny['scales'][ThemeOrAny['matchers'][Extract< + Property, + Tokens<'matchers'> + >]], + ValueOf + >, + CSSProperties[keyof CSSProperties] >; export type ThemedStyle = CSSProperties &