update react-mdl 1.5.3 -> 1.7.0 (#10881)

This commit is contained in:
Michaël Bitard
2016-08-30 16:20:27 +02:00
committed by Masahiro Wakame
parent 67827a1e39
commit 8fb286186b
2 changed files with 45 additions and 5 deletions

View File

@@ -2,7 +2,8 @@
/// <reference path="react-mdl.d.ts" />
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 (
<div>
<Chip>Basic chip</Chip>
<Chip onClose={e => { alert('Close icon clicked!'); }}>Deletable Chip</Chip>
<Chip onClick={e => { alert('Clicked!'); }}>Button Chip</Chip>
{/* Contact Chip */}
<Chip>
<ChipContact className="mdl-color--teal mdl-color-text--white">A</ChipContact>
Contact chip
</Chip>
{/* User Contact Chip */}
<Chip onClose={e => { alert('Close icon clicked!'); }}>
<ChipContact
style={{ background: 'url("https://placekitten.com/150/150") 0 0 / cover' }}
/>
Deletable user contact chip
</Chip>
</div>
);
}
});
// Button tests
React.createClass({
render: function() {

View File

@@ -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 <https://github.com/bradzacher>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -275,8 +275,17 @@ declare namespace __ReactMDL {
overlap ?: boolean;
}
class Badge extends __MDLComponent<BadgeProps> {}
interface ChipProps extends __MDLOtherProps {
onClick ?:React.MouseEventHandler;
onClose ?:React.MouseEventHandler;
}
class Chip extends __MDLComponent<ChipProps> {}
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;
}
}