UNPKG

589 BJavaScriptView Raw
1import { BVConfigPlugin } from 'bootstrap-vue';
2import Vue from 'vue';
3import { tooltipDelay } from './src/utils/constants';
4
5const bFormTextGlobalConfig = {
6 textVariant: 'gl-muted',
7};
8
9const tooltipGlobalConfig = {
10 customClass: 'gl-tooltip',
11 delay: tooltipDelay,
12};
13
14const glTooltipDelay = localStorage.getItem('gl-tooltip-delay');
15
16if (glTooltipDelay) {
17 tooltipGlobalConfig.delay = JSON.parse(glTooltipDelay);
18}
19
20const setConfigs = () => {
21 Vue.use(BVConfigPlugin, {
22 BFormText: bFormTextGlobalConfig,
23 BTooltip: tooltipGlobalConfig,
24 });
25};
26
27export default setConfigs;