How to use buefy - 10 common examples

To help you get started, we’ve selected a few buefy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mubaidr / vue-fluent / src / lib / index.js View on Github external
install(Vue, options = {}) {
    // Options
    setOptions(Object.assign(config, options))
    // Components
    for (let componentKey in components) {
      Vue.use(components[componentKey])
    }
  },
}
github mubaidr / vue-fluent / src / lib / index.js View on Github external
import config, { setOptions } from 'buefy/src/utils/config'
import { use } from 'buefy/src/utils/plugins'

const VueFluent = {
  install(Vue, options = {}) {
    // Options
    setOptions(Object.assign(config, options))
    // Components
    for (let componentKey in components) {
      Vue.use(components[componentKey])
    }
  },
}

use(VueFluent)

export default VueFluent
export * from 'buefy/src/components'
github CodeForPhilly / philly-ward-leaders / tests / app.spec.js View on Github external
test('Shows loading indicator when there are pending requests', () => {
    const $store = new Vuex.Store({
      state: {
        pendingRequests: {
          foo: { msg: 'bar' }
        }
      }
    })

    const wrapper = shallow(App, {
      mocks: { $store },
      stubs: ['router-view']
    })

    const indicator = wrapper.find(Buefy.Loading)
    const isActive = indicator.hasProp('active', true)
    expect(isActive).toBe(true)
  })
github CodeForPhilly / philly-ward-leaders / tests / app.spec.js View on Github external
test('Doesn\'t show loading indicator when no pending requests', () => {
    const $store = new Vuex.Store({
      state: {
        pendingRequests: {}
      }
    })

    const wrapper = shallow(App, {
      mocks: { $store },
      stubs: ['router-view']
    })

    const indicator = wrapper.find(Buefy.Loading)
    const isActive = indicator.hasProp('active', false)
    expect(isActive).toBe(true)
  })
github JDIS / flaggr / frontend / user / src / helpers.ts View on Github external
export function sendAlertWithVariables(message: string, variables: object, options: object = {}) {
  const defaults: SnackbarConfig = {
    message: VueI18n.t(message, variables) as string,
    type: 'is-danger',
    position: 'is-bottom-right',
    queue: false
  }
  SnackbarProgrammatic.open({...defaults, ...options} as SnackbarConfig)
}
github JDIS / flaggr / frontend / admin / src / helpers / alerts.helper.ts View on Github external
export function sendAlertWithVariables(message: string, variables: object, options: object = {}) {
  const defaults: SnackbarConfig = {
    message: VueI18n.t(message, variables) as string,
    type: 'is-danger',
    position: 'is-bottom-right',
    queue: false
  }
  SnackbarProgrammatic.open({...defaults, ...options} as SnackbarConfig)
}
github google / timesketch / timesketch / frontend / src / utils / RestApiClient.js View on Github external
}, function (error) {
  if (error.response.data.message === 'The CSRF token has expired') {
    Snackbar.open({
      message: error.response.data.message,
      type: 'is-white',
      position: 'is-top',
      actionText: 'Refresh',
      indefinite: true,
      onAction: () => {
        location.reload()
      }}
    )
  } else {
    Toast.open(error.response.data.message)
  }
  return Promise.reject(error);
});
github pkkid / pushingkarma / src / utils / utils.js View on Github external
export function snackbar(message, opts) {
  var type = message.toLowerCase().includes('error') ? 'is-danger' : 'is-success';
  Snackbar.open(Object.assign({
    duration: 300000,
    message: message,
    position: 'is-top-right',
    type: type,
  }, opts));
}
github pkkid / pushingkarma / src / utils / utils.js View on Github external
export function snackbar(message, opts) {
  var type = message.toLowerCase().includes('error') ? 'is-danger' : 'is-success';
  Snackbar.open(Object.assign({
    duration: 300000,
    message: message,
    position: 'is-top-right',
    type: type,
  }, opts));
}
github Flowm / satvis / src / modules / SatelliteProperties.js View on Github external
notifyPasses(aheadMin = 5) {
    if (!this.groundStationAvailable) {
      Toast.open({
        message: "Ground station required to notify for passes",
        type: "is-warning",
        position: "is-bottom",
        duration: 4000,
      });
      return;
    }
    let passes = this.orbit.computePasses(this.groundStationPosition);
    if (!passes) {
      Toast.open({
        message: `No passes for ${this.name}`,
        type: "is-warning",
        position: "is-bottom",
        duration: 4000,
      });
      return;
    }

    passes.forEach((pass) => {
      let start = dayjs(pass.start).startOf("second");
      this.pm.notifyAtDate(start.subtract(aheadMin, "minute"), `${pass.name} pass in ${aheadMin} minutes`);
      this.pm.notifyAtDate(start, `${pass.name} pass starting now`);
      //this.pm.notifyAtDate(dayjs().add(5, "second"), `${pass.name} test pass in ${aheadMin} minutes`);
    });
    Toast.open({
      message: `Notifying for passes of ${this.name}`,