Skip to content

Commit ab1af51

Browse files
committed
pat gallery: Import styles for photoswipe.
1 parent a1fea7d commit ab1af51

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGES.md

+1
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

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ 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+
import("photoswipe/dist/default-skin/default-skin.css");
28+
}
2529
const PhotoSwipe = (await import("photoswipe")).default;
2630
const PhotoSwipeUI = (await import("photoswipe/dist/photoswipe-ui-default")).default; // prettier-ignore
2731

0 commit comments

Comments
 (0)