Skip to content

Instantly share code, notes, and snippets.

@kvasdopil
Last active December 7, 2015 14:11
Show Gist options
  • Save kvasdopil/69a3ff1577e308f20494 to your computer and use it in GitHub Desktop.
Save kvasdopil/69a3ff1577e308f20494 to your computer and use it in GitHub Desktop.
export default class SomeModule extends React.Component
{
addUser()
{
this.refs.win1.show(() => console.log('adding user', this.refs.form1.values))
}
render() {
return <Module>
<Button title="Add user" onClick={() => this.addUser()} />
<TreeView url="users" />
<Modal ref="win1">
<Form ref="form1">
<Input name='name' default='New user' validator=Validators.UserName />
<Input name='desc' default='Mwahahah' />
</Form>
</Modal>
</Module>
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment