Add unit tests for some React.CSSProperties

This commit is contained in:
Tanguy Krotoff
2017-02-08 04:27:03 +01:00
parent e8f93d5c59
commit 9ecb61ea76
3 changed files with 24 additions and 3 deletions
+2 -1
View File
@@ -1276,8 +1276,9 @@ declare namespace React {
/**
* Defines how the browser distributes space between and around flex items
* along the main-axis of their container.
* See CSS 3 justify-content property https://www.w3.org/TR/css-flexbox-1/#justify-content-property
*/
justifyContent?: "flex-start" | "flex-end" | "center" | "space-between" | "space-around";
justifyContent?: ExplicitDefaultingCSSKeywords | "flex-start" | "flex-end" | "center" | "space-between" | "space-around";
layoutGrid?: any;
+19
View File
@@ -0,0 +1,19 @@
import * as React from 'react';
const initialStyle: React.CSSProperties = { fontWeight: 'initial' };
const initialStyleTest = <div style={initialStyle} />;
const fontSizeAdjustStyle: React.CSSProperties = { fontSizeAdjust: 'none' };
const fontSizeAdjustStyleTest = <div style={fontSizeAdjustStyle} />;
const fontStretchStyle: React.CSSProperties = { fontStretch: 'condensed' };
const fontStretchStyleTest = <div style={fontStretchStyle} />;
const fontStyleStyle: React.CSSProperties = { fontStyle: 'italic' };
const fontStyleStyleTest = <div style={fontStyleStyle} />;
const fontWeightStyle: React.CSSProperties = { fontWeight: 400 };
const fontWeightStyleTest = <div style={fontWeightStyle} />;
const justifyContentStyle: React.CSSProperties = { justifyContent: 'space-around' };
const justifyContentStyleTest = <div style={justifyContentStyle} />;
+3 -2
View File
@@ -2,7 +2,8 @@
"files": [
"index.d.ts",
"test/index.ts",
"test/tsx.tsx"
"test/tsx.tsx",
"test/cssProperties.tsx"
],
"compilerOptions": {
"module": "commonjs",
@@ -22,4 +23,4 @@
"forceConsistentCasingInFileNames": true,
"jsx": "preserve"
}
}
}