Skip to main content
type Flattened<T> = { [K in KebabCasePaths<T>]: string };
A flattened representation of the Tokens type, where keys are kebab-cased paths and all values are strings.

Type Parameters

Type Parameter
T extends Record<string, unknown>

Example

const themeOverrides: Partial<Flattened<typeof tokens>> = {
  'colors-brand-primary': string;
  'fontFamily-sans': string;
}
I