File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
packages/material-ui/src/styles Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 11import { Color , PaletteType } from '..' ;
2- import common from '../colors/common' ;
32
43export { } ;
5- type CommonColors = Record < keyof typeof common , string > ;
4+ // use standalone interface over typeof colors/commons
5+ // to enable module augmentation
6+ export interface CommonColors {
7+ black : string ;
8+ white : string ;
9+ }
610
711export type ColorPartial = Partial < Color > ;
812
Original file line number Diff line number Diff line change 11import { Color } from '@material-ui/core' ;
2- import { blue } from '@material-ui/core/colors' ;
2+ import { blue , common } from '@material-ui/core/colors' ;
33import {
44 createPalette ,
55 PaletteColorOptions ,
66 SimplePaletteColorOptions ,
7+ Theme ,
78} from '@material-ui/core/styles' ;
89
910{
@@ -22,3 +23,7 @@ import {
2223 palette . augmentColor ( colorOrOption , 400 ) ; // $ExpectError
2324 const augmentedColor = palette . augmentColor ( colorOrOption ) ;
2425}
26+
27+ {
28+ const themeCommons : Theme [ 'palette' ] [ 'common' ] = common ;
29+ }
You can’t perform that action at this time.
0 commit comments