insomnia/plugins/insomnia-plugin-kong-portal/index.js
Jack Kavanagh f4b859832c
Consistent wording of Dev Portal (#4073)
* change copy in box

* Consistent Dev Portal wording

* skips test with breadcrumb comment
2021-10-06 10:29:48 +02:00

30 lines
715 B
JavaScript

import React from 'react';
import ReactDOM from 'react-dom';
import DeployToPortal from './src/deploy-to-portal';
export const documentActions = [
{
label: 'Deploy to Dev Portal',
hideAfterClick: true,
action(context, spec) {
const root = document.createElement('div');
ReactDOM.render(
<DeployToPortal
spec={spec}
store={context.store}
axios={context.__private.axios}
trackEvent={context.__private.analytics.trackEvent}
/>,
root,
);
context.app.dialog('Deploy to Dev Portal', root, {
skinny: true,
onHide() {
ReactDOM.unmountComponentAtNode(root);
},
});
},
},
];