diff --git a/react-mdl/react-mdl-tests.tsx b/react-mdl/react-mdl-tests.tsx index 1e7fd19b0c..fe775eb4a4 100644 --- a/react-mdl/react-mdl-tests.tsx +++ b/react-mdl/react-mdl-tests.tsx @@ -2,7 +2,8 @@ /// import * as React from 'react'; -import {Badge, +import {Chip, ChipContact, + Badge, FABButton, Button, IconButton, Card, CardActions, CardTitle, CardText, CardMenu, CardMedia, Checkbox, @@ -50,6 +51,34 @@ React.createClass({ } }); +// Chip tests +React.createClass({ + render: function() { + return ( +
+ Basic chip + + { alert('Close icon clicked!'); }}>Deletable Chip + + { alert('Clicked!'); }}>Button Chip + {/* Contact Chip */} + + A + Contact chip + + + {/* User Contact Chip */} + { alert('Close icon clicked!'); }}> + + Deletable user contact chip + +
+ ); + } +}); + // Button tests React.createClass({ render: function() { diff --git a/react-mdl/react-mdl.d.ts b/react-mdl/react-mdl.d.ts index 56d688c7f4..c3786bd662 100644 --- a/react-mdl/react-mdl.d.ts +++ b/react-mdl/react-mdl.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-mdl 1.5.3 +// Type definitions for react-mdl 1.7.0 // Project: https://github.com/tleunen/react-mdl // Definitions by: Brad Zacher // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -275,8 +275,17 @@ declare namespace __ReactMDL { overlap ?: boolean; } class Badge extends __MDLComponent {} - - + + + interface ChipProps extends __MDLOtherProps { + onClick ?:React.MouseEventHandler; + onClose ?:React.MouseEventHandler; + } + + class Chip extends __MDLComponent {} + + class ChipContact extends __MDLComponent<__MDLOtherProps> {} + interface ButtonProps extends __MDLOtherProps, RippleComponent, CustomRenderedComponent { accent ?: boolean; colored ?: boolean; @@ -401,9 +410,11 @@ declare namespace __ReactMDL { transparent ?: boolean; waterfall ?: boolean; hideTop ?: boolean; + hideSpacer ?: boolean; } interface HeaderRowProps extends __MDLOtherProps { title ?: string; + hideSpacer ?: boolean; } interface HeaderTabsProps extends __MDLOtherProps, RippleComponent { activeTab ?: number; @@ -603,4 +614,4 @@ declare namespace __ReactMDL { declare module 'react-mdl' { export = __ReactMDL; -} \ No newline at end of file +}