mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
Fix travis build errors in material-ui tests
* Create type Stylesheet who's props are all of type CSSProperties * Declared function createStylesheet which takes in an object and converts it's key-values to CSSProperties
This commit is contained in:
@@ -109,7 +109,13 @@ function handleTouchTap() {
|
||||
alert('onTouchTap triggered on the title component');
|
||||
}
|
||||
|
||||
const styles = {
|
||||
type Stylesheet<T> = {
|
||||
[P in keyof T]: React.CSSProperties
|
||||
};
|
||||
|
||||
declare function createStylesheet<T>(args: T): Stylesheet<T>;
|
||||
|
||||
const styles = createStylesheet({
|
||||
title: {
|
||||
cursor: 'pointer',
|
||||
},
|
||||
@@ -232,7 +238,7 @@ const styles = {
|
||||
floatingLabelFocusStyle: {
|
||||
color: blue500,
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
const style = {
|
||||
marginRight: 20,
|
||||
|
||||
Reference in New Issue
Block a user