Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onClick={this.onButtonClick}>
Click on me to open dialog extension
);
}
}
export const initialize = sdk => {
if (sdk.location.is(locations.LOCATION_DIALOG)) {
ReactDOM.render(, document.getElementById('root'));
} else {
ReactDOM.render(, document.getElementById('root'));
}
};
init(initialize);
/**
* By default, iframe of the extension is fully reloaded on every save of a source file.
* If you want to use HMR (hot module reload) instead of full reload, uncomment the following lines
*/
// if (module.hot) {
// module.hot.accept();
// }
export function setup(integration: Integration) {
init(sdk => {
const root = document.getElementById('root');
if (sdk.location.is(locations.LOCATION_DIALOG)) {
integration.renderDialog(sdk as DialogExtensionSDK);
}
if (sdk.location.is(locations.LOCATION_ENTRY_FIELD)) {
render(
,