diff options
Diffstat (limited to 'graphgraph-fe/src/DownloadExport.js')
-rw-r--r-- | graphgraph-fe/src/DownloadExport.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/graphgraph-fe/src/DownloadExport.js b/graphgraph-fe/src/DownloadExport.js new file mode 100644 index 0000000..b031773 --- /dev/null +++ b/graphgraph-fe/src/DownloadExport.js @@ -0,0 +1,29 @@ +import React from 'react' +import { Button } from 'react-bootstrap' +import { exportSchema } from './requests' + + +class DownloadExport extends React.Component { + constructor (props, context) { + super(props, context) + this.download = this.download.bind(this) + } + + download() { + + setTimeout(() => { + const response = { + file: exportSchema(this.props.schemaVersion), + }; + window.open(response.file); + }, 100); + } + + render() { + return ( + <Button onClick={this.download}>Download as XMI</Button> + ); + } +} + +export default DownloadExport |