Skip to content

Commit 6209bb4

Browse files
committed
pat gallery: Import styles for photoswipe.
1 parent ac7492e commit 6209bb4

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535

3636
### Features
3737

38+
- pat gallery: Import styles for photoswipe.
3839
- pat carousel: Import styles for slick carousel.
3940
- pat auto suggest: Import styles for select2.
4041
- pat-tooltip: Import styles for tippy.

src/pat/gallery/gallery.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ export default Base.extend({
2222
origBodyOverflow: "auto",
2323

2424
async init($el, opts) {
25+
if (window.__patternslib_import_styles) {
26+
import("photoswipe/dist/photoswipe.css");
27+
}
2528
const PhotoSwipe = (await import("photoswipe")).default;
2629
const PhotoSwipeUI = (await import("photoswipe/dist/photoswipe-ui-default")).default; // prettier-ignore
2730

0 commit comments

Comments
 (0)