From 0adf0673e19d9ae364e6e639545b48244939bf2d Mon Sep 17 00:00:00 2001 From: Yassine Fikri Date: Tue, 8 Aug 2023 09:49:06 +0100 Subject: [PATCH] add swup progress bar example to docs --- src/Swup/doc/index.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Swup/doc/index.rst b/src/Swup/doc/index.rst index adae424fb80..16859b6191c 100644 --- a/src/Swup/doc/index.rst +++ b/src/Swup/doc/index.rst @@ -144,6 +144,7 @@ Stimulus controller: // assets/controllers/myswup_controller.js import { Controller } from '@hotwired/stimulus'; + import SwupProgressPlugin from '@swup/progress-plugin'; export default class extends Controller { connect() { @@ -160,6 +161,7 @@ Stimulus controller: _onPreConnect(event) { // Swup has not been initialized - options can be changed console.log(event.detail.options); // Options that will be used to initialize Swup + event.detail.options.plugins.push(new SwupProgressPlugin()); // Adding the progress bar plugin } _onConnect(event) {