@qvant/qui-max
Version:
A Vue 3 Design system for Web.
16 lines (15 loc) • 673 B
JavaScript
import { getCurrentInstance, inject } from "vue";
import { createProgressIndicatior } from "./src/index.js";
import { PROGRESS_INDICATIOR_INJECTION_KEY } from "./src/constants.js";
let progressIndicatior = null;
const QProgressIndicatiorPlugin = {
install: (app, options) => {
progressIndicatior = createProgressIndicatior(options);
app.provide(PROGRESS_INDICATIOR_INJECTION_KEY, progressIndicatior);
}
};
const useProgressIndicatior = () => {
return getCurrentInstance() ? inject(PROGRESS_INDICATIOR_INJECTION_KEY) : progressIndicatior;
};
export { QProgressIndicatiorPlugin as QProgressIndicatior, useProgressIndicatior };
//# sourceMappingURL=index.js.map