How to use the buefy.SnackbarProgrammatic.open function in buefy

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 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));
}