import * as React from 'react'; import Button from '../../components/button'; import Dialog from '../../components/dialog'; import Dropdown from '../../components/dropdown'; const dialogTypes = [ { value: 'small', label: 'small' }, { value: 'normal', label: 'normal' }, { value: 'large', label: 'large' }, { value: 'fullscreen', label: 'fullscreen' }, ]; class DialogTest extends React.Component { state = { active: false, type: 'normal', }; handleToggle = () => { this.setState({ active: !this.state.active, }); }; changeDialogType = (value: any) => { this.setState({ type: value }); }; actions = [ { label: 'Disagree', primary: true, onClick: this.handleToggle }, { label: 'Agree', primary: true, onClick: this.handleToggle }, ]; render() { return (
Dialog

lorem ipsum...

); } } class ContextComponent extends React.Component { static propTypes = { children: React.PropTypes.any, }; static childContextTypes = { message: React.PropTypes.string, } getChildContext() { return { message: 'Hi, I\'m the top container', }; } render() { return this.props.children; } } class DialogChild extends React.Component { static contextTypes = { message: React.PropTypes.string, } render() { return

This message comes from a parent: {this.context.message}

; } } export default DialogTest;