npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

muse-ui-toast

v0.3.0

Published

muse-ui toast plugin

Downloads

459

Readme

Muse-UI-Toast

Muse-UI plugin toast

Installation

npm install muse-ui-toast -S
// or
yarn add muse-ui-toast

CDN

<link rel="stylesheet" href="https://unpkg.com/muse-ui-loading/dist/muse-ui-toast.all.css"/>
<script src="https://unpkg.com/muse-ui-toast/dist/muse-ui-toast.js"></script>

Usage

import Vue from 'vue'
import MuseUIToast from 'muse-ui-toast';

Vue.use(MuseUIToast);

new Vue({
  methods: {
    toast () {
      this.$toast.message('hello world');
      this.$toast.success('hello world');
      this.$toast.info('hello world');
      this.$toast.warning('hello world');
      this.$toast.error('hello world');
    }
  }
});

// Or
MuseUIToast.message('hello world');
MuseUIToast.success('hello world');
MuseUIToast.info('hello world');
MuseUIToast.warning('hello world');
MuseUIToast.error('hello world');

API

config

Vue.use(MuseUIToast, config) change default config

export default {
  position: 'bottom',               // position
  time: 2000,                       // show time length
  closeIcon: 'close',               // close icon
  close: true,                      // show close button
  successIcon: 'check_circle',      // success icon
  infoIcon: 'info',                 // info icon
  warningIcon: 'priority_high',     // warning icon
  errorIcon: 'warning'              // error icon
};

config (config)

Change default config, Will return new config;

message(options<String/Object>)

Show default message, Will return id;

success(options<String/Object>)

Show default success message, Will return id;

info(options<String/Object>)

Show default info message, Will return id;

error(options<String/Object>)

Show default error message, Will return id;

warning(options<String/Object>)

Show default warning message, Will return id;

options

| Name | Description | Type | Accepted Values | Default | |------|-------------|------|-----------------|---------| | message | show message content | String | — | — | | time | show time length | Number | — | 2000 | | position | show position | String | top / top-start / top-end / bottom / bottom-start / bottom-end | bottom | | close | Whether the show close button | Boolean | — | true | | icon | left icon | String | — | — | | actions | action buttons, | Array, [{ action: '', click: (id) => {} }] | — | — | | color | color | String | — | — | | textColor | message text color | String | — | — |

close (id)

close message

Dependencies Muse-UI Components

  • mu-snackbar
  • mu-button
  • mu-icon

Licence

muse-ui-toast is open source and released under the MIT Licence.

Copyright (c) 2018 myron