diff --git a/material-ui/material-ui-tests.tsx b/material-ui/material-ui-tests.tsx index 0165dee1f7..ace37bdc7d 100644 --- a/material-ui/material-ui-tests.tsx +++ b/material-ui/material-ui-tests.tsx @@ -47,7 +47,13 @@ type CheckboxProps = __MaterialUI.CheckboxProps; type MuiTheme = __MaterialUI.Styles.MuiTheme; type TouchTapEvent = __MaterialUI.TouchTapEvent; -class MaterialUiTests extends React.Component<{}, {}> implements React.LinkedStateMixin { +interface MaterialUiTestsState { + showDialogStandardActions: boolean; + showDialogCustomActions: boolean; + showDialogScrollable: boolean; +} + +class MaterialUiTests extends React.Component<{}, MaterialUiTestsState> implements React.LinkedStateMixin { // injected with mixin linkState: (key: string) => React.ReactLink; @@ -60,6 +66,8 @@ class MaterialUiTests extends React.Component<{}, {}> implements React.LinkedSta } private selectFieldChangeHandler(e: TouchTapEvent, si: number, mi: any) { } + private handleRequestClose(buttonClicked: boolean) { + } render() { @@ -193,7 +201,8 @@ class MaterialUiTests extends React.Component<{}, {}> implements React.LinkedSta title="Dialog With Standard Actions" actions={standardActions} actionFocus="submit" - modal={true}> + open={this.state.showDialogStandardActions} + onRequestClose={this.handleRequestClose}> The actions in this window are created from the json that's passed in. ; @@ -212,12 +221,23 @@ class MaterialUiTests extends React.Component<{}, {}> implements React.LinkedSta element = + open={this.state.showDialogCustomActions} + onRequestClose={this.handleRequestClose}> The actions in this window were passed in as an array of react objects. ; + element = +
+ Really long content +
+
; + // "http://material-ui.com/#/components/dropdown-menu" let menuItems = [ diff --git a/material-ui/material-ui.d.ts b/material-ui/material-ui.d.ts index df6a088a7a..a27a0ee09d 100644 --- a/material-ui/material-ui.d.ts +++ b/material-ui/material-ui.d.ts @@ -1,4 +1,4 @@ -// Type definitions for material-ui v0.13.1 +// Type definitions for material-ui v0.13.4 // Project: https://github.com/callemall/material-ui // Definitions by: Nathan Brown , Oliver Herrmann // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -379,14 +379,18 @@ declare namespace __MaterialUI { openImmediately?: boolean; repositionOnUpdate?: boolean; title?: React.ReactNode; + defaultOpen?: boolean; + open?: boolean; onClickAway?: () => void; onDismiss?: () => void; onShow?: () => void; + onRequestClose?: (buttonClicked: boolean) => void; } export class Dialog extends React.Component { dismiss(): void; show(): void; + isOpen(): boolean; } interface DropDownIconProps extends React.Props {