insomnia/app/ui/components/settings/SettingsImportExport.js

45 lines
1.4 KiB
JavaScript
Raw Normal View History

import React, {PropTypes} from 'react';
import {Dropdown, DropdownButton, DropdownItem, DropdownDivider} from '../base/dropdown';
const SettingsImportExport = ({
handleImport,
handleExportAll,
handleExportWorkspace
}) => (
<div>
<h1 className="no-margin-top">Data Import and Export</h1>
<p>
Import format will be automatically detected (<strong>Insomnia, Postman, HAR, cURL</strong>)
</p>
2016-11-19 03:21:15 +00:00
<Dropdown outline={true}>
2016-11-26 00:49:38 +00:00
<DropdownButton className="btn btn--clicky">
2016-11-19 03:21:15 +00:00
Export Data <i className="fa fa-caret-down"></i>
</DropdownButton>
<DropdownDivider name="Choose Export Type"/>
<DropdownItem onClick={e => handleExportWorkspace()}>
<i className="fa fa-home"></i>
Current Workspace
</DropdownItem>
<DropdownItem onClick={e => handleExportAll()}>
<i className="fa fa-empty"></i>
All Workspaces
</DropdownItem>
</Dropdown>
&nbsp;&nbsp;
2016-11-26 00:49:38 +00:00
<button className="btn btn--clicky" onClick={e => handleImport()}>
2016-11-19 03:21:15 +00:00
Import Data
</button>
<p className="italic faint pad-top">
* Tip: You can also paste Curl commands into the URL bar
</p>
</div>
);
SettingsImportExport.propTypes = {
handleImport: PropTypes.func.isRequired,
handleExportAll: PropTypes.func.isRequired,
handleExportWorkspace: PropTypes.func.isRequired,
};
export default SettingsImportExport;