Add some attributes tests to react-tests and remove index signature from React.CSSProperties

This commit is contained in:
Vincent Siao
2014-12-08 14:55:10 -08:00
parent cc25144fde
commit b4174b1ff1
2 changed files with 25 additions and 3 deletions
+24
View File
@@ -115,6 +115,30 @@ var value: string = inputRef.getDOMNode<HTMLInputElement>().value;
var myComponent = <MyComponent>compComponent;
myComponent.reset();
//
// Attributes
// --------------------------------------------------------------------------
var divStyle = { // CSSProperties
flex: "1 1 main-size",
backgroundImage: "url('hello.png')"
};
var htmlAttr = {
children: ["Hello world", [null], React.DOM.span(null)],
className: "test-attr",
style: divStyle,
onClick: (event: React.MouseEvent) => {
event.preventDefault();
event.stopPropagation();
},
dangerouslySetInnerHTML: {
__html: "<strong>STRONG</strong>"
}
};
React.DOM.div(htmlAttr);
React.DOM.span(htmlAttr);
React.DOM.input(htmlAttr);
//
// PropTypes
// --------------------------------------------------------------------------