@gatsby-cloud-pkg/gatsby-cms-extension-base
Advanced tools
Comparing version 0.0.46 to 0.0.47
@@ -12,7 +12,8 @@ /// <reference types="react" /> | ||
}): Promise<Window>; | ||
export declare function ExtensionUI({ contentSlug, previewUrl, authToken, children }: { | ||
export declare function ExtensionUI({ contentSlug, previewUrl, authToken, onOpenPreviewButtonClick, children, }: { | ||
contentSlug: any; | ||
previewUrl: any; | ||
authToken: any; | ||
onOpenPreviewButtonClick: any; | ||
children: any; | ||
}): JSX.Element; |
@@ -102,9 +102,10 @@ "use strict"; | ||
`; | ||
function ExtensionUI({ contentSlug, previewUrl, authToken, children }) { | ||
function ExtensionUI({ contentSlug, previewUrl, authToken, onOpenPreviewButtonClick, children, }) { | ||
return (React.createElement("div", null, | ||
previewUrl ? (React.createElement(react_1.Fragment, null, | ||
React.createElement(Button, { className: "preview-button", type: "button", onClick: () => __awaiter(this, void 0, void 0, function* () { | ||
return contentSlug | ||
contentSlug | ||
? openPreview({ contentSlug, previewUrl, authToken }) | ||
: window.open(previewUrl); | ||
onOpenPreviewButtonClick === null || onOpenPreviewButtonClick === void 0 ? void 0 : onOpenPreviewButtonClick(); | ||
}) }, "Open Preview"), | ||
@@ -111,0 +112,0 @@ children)) : (React.createElement(Text, null, "Missing required Gatsby Cloud Preview url. Please check your configuration.")), |
{ | ||
"name": "@gatsby-cloud-pkg/gatsby-cms-extension-base", | ||
"version": "0.0.46", | ||
"version": "0.0.47", | ||
"private": false, | ||
@@ -49,3 +49,3 @@ "description": "Common utilities for integrating Gatsby Preview with CMS providers", | ||
}, | ||
"gitHead": "b70a73431df7f49d376c7ee7cec8c7178bc4a2f3" | ||
"gitHead": "dc610795bed29e2ea25fa8f79f9a3677636fc7d2" | ||
} |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
15936
155
2