Skip to content

Commit fe90c73

Browse files
committed
feat(pat-sortable): Optionally import the sortable styles.
Import the sortable styles when the global variable `__patternslib_import_styles` is set to `true` (the default is `false`). This allows to show the sortable marker without having to separately load all the styles.
1 parent 752036f commit fe90c73

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/pat/sortable/sortable.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ export default Base.extend({
1515
trigger: ".pat-sortable",
1616

1717
init: function () {
18+
if (window.__patternslib_import_styles) {
19+
import("./_sortable.scss");
20+
}
1821
this.$form = this.$el.closest("form");
1922
this.options = parser.parse(this.$el, false);
2023
this.recordPositions().addHandles().initScrolling();

0 commit comments

Comments
 (0)