Fixed scrolling for Admin preview

This commit is contained in:
Peter Zimon 2021-09-01 17:56:30 +02:00
parent 46db3e64ae
commit 8f4955e44d
5 changed files with 16 additions and 3 deletions

View File

@ -19,7 +19,7 @@ const DEV_MODE_DATA = {
showPopup: true,
site: Fixtures.site,
member: Fixtures.member.paid,
page: 'signin'
page: 'signup'
};
function SentryErrorBoundary({site, children}) {

View File

@ -221,6 +221,7 @@ const FrameStyles = `
.gh-portal-popup-background.preview {
background: #EDF0F2;
animation: none;
pointer-events: none;
}
@keyframes fadein {
@ -808,6 +809,7 @@ const MultipleProductsGlobalStyles = `
margin: 32px;
height: calc(100vh - 64px) !important;
overflow-y: scroll;
overflow-x: clip;
background: #fff;
box-shadow: 0 3.8px 2.2px rgba(0, 0, 0, 0.028), 0 9.2px 5.3px rgba(0, 0, 0, 0.04), 0 17.3px 10px rgba(0, 0, 0, 0.05), 0 30.8px 17.9px rgba(0, 0, 0, 0.06), 0 57.7px 33.4px rgba(0, 0, 0, 0.072), 0 138px 80px rgba(0, 0, 0, 0.1);
padding: 0;
@ -868,6 +870,10 @@ const MultipleProductsGlobalStyles = `
max-height: 640px;
}
}
.gh-portal-popup-container.preview * {
pointer-events: none !important;
}
`;
export function getFrameStyles({site}) {

View File

@ -95,6 +95,9 @@ class PopupContent extends React.Component {
}
handlePopupClose(e) {
if (hasMode(['preview'])) {
return;
}
e.preventDefault();
if (e.target === e.currentTarget) {
this.context.onAction('closePopup');

View File

@ -64,6 +64,10 @@ export const PlanSectionStyles = `
border-right: none;
}
.gh-portal-plans-container:not(.has-multiple-products) {
margin-bottom: 2px;
}
.gh-portal-plans-container.has-multiple-products .gh-portal-plan-section::before {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;

View File

@ -164,8 +164,8 @@ export const site = {
currency: 'USD'
},
portal_products: ['product_1', 'product_2', 'product_3'],
products: [products[0]],
// products: products,
// products: [products[0]],
products: products,
prices,
allow_self_signup: true,
members_signup_access: 'all',