UNPKG

@ftrack/react-toolbox

Version:

A set of React components implementing Google's Material Design specification with the power of CSS Modules.

34 lines (29 loc) 778 B
class DialogTest extends React.Component { state = { active: false }; handleToggle = () => { this.setState({active: !this.state.active}); } actions = [ { label: "Cancel", onClick: this.handleToggle }, { label: "Save", onClick: this.handleToggle } ]; render () { return ( <div> <Button label='Show my dialog' onClick={this.handleToggle} /> <Dialog actions={this.actions} active={this.state.active} onEscKeyDown={this.handleToggle} onOverlayClick={this.handleToggle} title='My awesome dialog' > <p>Here you can add arbitrary content. Components like Pickers are using dialogs now.</p> </Dialog> </div> ); } } return <DialogTest />;