Skip to content

Commit f80bd6f

Browse files
committed
add fixes
- grayed toggle for premium - fix pro note
1 parent c12aff2 commit f80bd6f

File tree

2 files changed

+44
-2
lines changed

2 files changed

+44
-2
lines changed

src/components/design-library-list/design-library-list-item.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,11 @@ const DesignLibraryListItem = forwardRef( ( props, ref ) => {
240240
}
241241
}, [ selectedNum ] )
242242

243+
const getDesignPreviewSize = () => {
244+
return selectedNum && selectedData ? selectedData.selectedPreviewSize.preview
245+
: ( enableBackground ? previewSize.heightBackground : previewSize.heightNoBackground )
246+
}
247+
243248
return (
244249
<button
245250
className={ mainClasses }
@@ -260,7 +265,7 @@ const DesignLibraryListItem = forwardRef( ( props, ref ) => {
260265
} }
261266
>
262267
{ ! isPro && plan !== 'free' && <span className="stk-pulsating-circle" role="presentation" /> }
263-
<div style={ { position: 'relative' } }>
268+
<div style={ { position: 'relative' } } className={ `${ getDesignPreviewSize() > 200 ? 'stk--design-preview-large' : '' }` }>
264269
{ ! isPro && plan !== 'free' && (
265270
<ProControl
266271
type="design-library"

src/components/design-library-list/editor.scss

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,30 @@
8282
background: #fff;
8383
opacity: 0;
8484
transition: all 0.3s cubic-bezier(0.2, 0.6, 0.4, 1);
85-
padding: 0 24px; // This is for v2 blocks where the design library can be seen in the inspector.
85+
padding: 0 16px; // This is for v2 blocks where the design library can be seen in the inspector.
86+
display: grid;
87+
grid-template-columns: 1fr 1fr;
88+
align-content: center;
89+
90+
h4 {
91+
font-size: 12px !important;
92+
}
93+
94+
.ugb-design-control-pro-note__description {
95+
grid-row: 1/3;
96+
grid-column: 2/3;
97+
margin-bottom: 0 !important;
98+
font-size: 11px !important;
99+
}
100+
a.button {
101+
font-size: 11px !important;
102+
padding: 8px;
103+
104+
svg {
105+
height: 12px;
106+
width: 12px;
107+
}
108+
}
86109
}
87110
&[class*="ugb--is-premium"]:hover {
88111
.ugb-design-control-pro-note {
@@ -120,6 +143,9 @@
120143
color: #bbb;
121144
}
122145
}
146+
&.ugb--is-premium footer .stk-block-design__selected-num {
147+
border: 1px solid #ddd;
148+
}
123149

124150
&.ugb--is-toggled footer {
125151
.stk-block-design__selected-num {
@@ -196,4 +222,15 @@
196222

197223
:host body {
198224
min-height: 500px;
225+
}
226+
227+
.stk--design-preview-large {
228+
.ugb-design-control-pro-note {
229+
grid-template-columns: 1fr;
230+
231+
.ugb-design-control-pro-note__description {
232+
grid-row: 2/3;
233+
grid-column: 1/2;
234+
}
235+
}
199236
}

0 commit comments

Comments
 (0)