React specific typings for css position (#15575)

* React CSSProperties position made specific

* Add test for css position
This commit is contained in:
Wayne Dela Cruz
2017-04-17 08:34:07 -07:00
committed by Andy
parent 9e70bd6d36
commit e4c860c1ba
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -1599,7 +1599,7 @@ declare namespace React {
/**
* The position property controls the type of positioning used by an element within its parent elements. The effect of the position property depends on a lot of factors, for example the position property of parent elements.
*/
position?: CSSWideKeyword | any;
position?: CSSWideKeyword | "static" | "relative" | "absolute" | "fixed" | "sticky";
/**
* Obsolete: unsupported.
+3
View File
@@ -30,6 +30,9 @@ const boxShadowStyleTest = <div style={boxShadowStyle} />;
const overflowStyle: React.CSSProperties = { overflow: 'auto', overflowX: 'visible', overflowY: 'scroll' };
const overflowStyleTest = <div style={overflowStyle} />;
const positionStyle: React.CSSProperties = { position: 'relative' };
const positionStyleTest = <div style={positionStyle} />;
// SVG specific style attribute declarations
const fillOpacityStyle: React.CSSProperties = { fillOpacity: 0.3 };