Skip to content

Commit c12aff2

Browse files
committed
apply fixes
- remove margin bottom - remove plan dropdown - fix warning
1 parent 38205d0 commit c12aff2

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,13 +274,11 @@
274274
}
275275
}
276276

277-
.ugb-modal-design-library__refresh {
278-
margin-right: 10px;
277+
.ugb-modal-design-library__style-options div.components-base-control {
278+
margin-bottom: 0;
279279
}
280280

281281
div.ugb-modal-design-library__enable-background {
282-
margin-bottom: 0;
283-
284282
.components-flex {
285283
justify-content: space-between;
286284
}
@@ -407,6 +405,9 @@ div.ugb-modal-design-library__enable-background {
407405
.stk-design-library__header-settings {
408406
position: absolute;
409407
right: 60px;
408+
display: flex;
409+
gap: 10px;
410+
align-items: center;
410411
}
411412
.stk-design-library__plan-dropdown, .ugb-design-library__color-scheme-popover {
412413
--wp-admin-theme-color: #f00069;

src/components/modal-design-library/modal.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { getDesigns, filterDesigns } from '~stackable/design-library'
1111
/**
1212
* External deprendencies
1313
*/
14-
import { i18n } from 'stackable'
14+
import { i18n, isPro } from 'stackable'
1515
import classnames from 'classnames'
1616
import { useLocalStorage } from '~stackable/util'
1717

@@ -158,7 +158,7 @@ export const ModalDesignLibrary = props => {
158158
className="ugb-modal-design-library__refresh"
159159
onClick={ () => setDoReset( true ) }
160160
/>
161-
<Dropdown
161+
{ ! isPro && <Dropdown
162162
focusOnMount="container"
163163
renderToggle={ ( { onToggle } ) => (
164164
<Button
@@ -188,7 +188,7 @@ export const ModalDesignLibrary = props => {
188188
} ) }
189189
</div>
190190
) }
191-
/>
191+
/> }
192192
</div>
193193
</>
194194
) }

src/design-library/init.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,12 @@ public function register_design_pattern() {
424424
$designs = $this->get_design_library_from_cloud();
425425

426426
$library = $designs[ self::API_VERSION ];
427+
428+
if ( ! $library ) {
429+
return;
430+
}
431+
432+
427433
$disabled_blocks = $this->get_disabled_blocks();
428434

429435

0 commit comments

Comments
 (0)