Skip to content

Instantly share code, notes, and snippets.

@tygas
Created September 12, 2017 09:04
Show Gist options
  • Save tygas/b5c27a77578300f9ebff73820ce4f572 to your computer and use it in GitHub Desktop.
Save tygas/b5c27a77578300f9ebff73820ce4f572 to your computer and use it in GitHub Desktop.
import React, { Component } from 'react';
class WidgetApp extends Component {
constructor(props) {
super(props);
this.state = { isOpen: false };
}
toggleModal = () => {
this.setState({
isOpen: !this.state.isOpen,
});
};
render() {
return (
<div>
<p>I am a Widget - <a href={'/selvbetjening'}>Selvbetjening</a></p>
<button onClick={e => { this.toggleModal(e); }}>
Open th
</button>
</div>
);
}
}
export default WidgetApp;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment