mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
[theme-ui] Make styles' properties optional (#38261)
* Make theme-ui styles properties optional * Add theme-ui styles test
This commit is contained in:
parent
ad9de8655d
commit
fe0910342b
3
types/theme-ui/index.d.ts
vendored
3
types/theme-ui/index.d.ts
vendored
@ -3,6 +3,7 @@
|
||||
// Definitions by: Erik Stockmeier <https://github.com/erikdstock>
|
||||
// Ifiok Jr. <https://github.com/ifiokjr>
|
||||
// Brian Andrews <https://github.com/sbardian>
|
||||
// Rodrigo Pombo <https://github.com/pomber>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.1
|
||||
|
||||
@ -111,7 +112,7 @@ export interface Theme extends StyledSystemTheme {
|
||||
* fonts, etc.
|
||||
*/
|
||||
styles?: {
|
||||
[P in StyledTags]: SystemStyleObject;
|
||||
[P in StyledTags]?: SystemStyleObject;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -96,3 +96,19 @@ const incompleteThemeColorModes: Theme = {
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const themeWithStyles: Theme = {
|
||||
colors: {
|
||||
text: '#000',
|
||||
background: '#fff',
|
||||
primary: '#07c',
|
||||
},
|
||||
styles: {
|
||||
h1: {
|
||||
fontSize: 32,
|
||||
color: 'primary',
|
||||
mt: 4,
|
||||
mb: 2,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user