Skip to content

Commit 0c4ad67

Browse files
committed
Move colors scale to separate interface
1 parent 4458fc7 commit 0c4ad67

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

packages/css/src/types.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,16 @@ export interface ColorMode {
527527
[k: string]: CSS.ColorProperty | ObjectOrArray<CSS.ColorProperty>
528528
}
529529

530+
interface ColorModesScale extends ColorMode {
531+
/**
532+
* Nested color modes can provide overrides when used in conjunction with
533+
* `Theme.initialColorModeName and `useColorMode()`
534+
*/
535+
modes?: {
536+
[k: string]: ColorMode
537+
}
538+
}
539+
530540
export interface Theme {
531541
breakpoints?: Array<string>
532542
mediaQueries?: { [size: string]: string }
@@ -584,15 +594,7 @@ export interface Theme {
584594
/**
585595
* Define the colors that are available through this theme
586596
*/
587-
colors?: ColorMode & {
588-
/**
589-
* Nested color modes can provide overrides when used in conjunction with
590-
* `Theme.initialColorModeName and `useColorMode()`
591-
*/
592-
modes?: {
593-
[k: string]: ColorMode
594-
}
595-
}
597+
colors?: ColorModesScale
596598

597599
/**
598600
* Styles for elements rendered in MDX can be added to the theme.styles

0 commit comments

Comments
 (0)