import React, { PropTypes } from 'react'; import Button from '../../components/button'; import Dialog from '../../components/dialog'; class DialogTest extends React.Component { state = { active: false }; handleToggle = () => { this.setState({ active: !this.state.active }); }; 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: PropTypes.any }; static childContextTypes = { message: PropTypes.string } getChildContext () { return { message: 'Hi, I\'m the top container' }; } render () { return this.props.children; } } class DialogChild extends React.Component { static contextTypes = { message: PropTypes.string } render () { return

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

; } } export default DialogTest;