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

b-toast

v0.1.4

Published

> Uma biblioteca de toasts para Vue 2

Downloads

55

Readme

b-toast

Uma biblioteca de toasts para Vue 2

O b-toast é uma biblioteca de toasts simples e personalizáveis para Vue 2. Ele fornece um componente Vue fácil de usar para exibir notificações no estilo toast em seu aplicativo.

Recursos

  • Exibe notificações de estilo toast de forma simples e elegante.
  • Personalizável para atender às necessidades do seu aplicativo.
  • Suporte a tipos de toasts: sucesso, erro, aviso, informativo, etc.
  • Fácil integração com projetos Vue 2 existentes.

NPM

https://www.npmjs.com/package/b-toast

Demonstração

Precisa de exemplos: demonstração

Instalação

$ npm install b-toast

Uso

Registro do plugin

Registre o componente b-toast globalmente em seu aplicativo Vue:

import Vue from "vue";
import bToast from "b-toast";
// Importe o css do Toast
import "b-toast/dist/bToast.css";

const options = {
  // Você pode setar as opções padrões aqui
};

Vue.use(bToast, options);

Em seguida, você pode usar o componente b-toast em qualquer lugar em seu aplicativo:

this.$btoast("Olá sou um toast!");

// Ou com opções
const id = this.$btoast("Conteúdo do toast", {
  isDark: true,
});
// Ao invocar o toast, é retornado um ID único que
// pode ser usado para removê-lo da tela, se necessário.

//Removendo todos os toasts
this.$btoast.clear();

//Removendo um dos toasts (por id)
this.$btoast.dismiss(id);

Também é possivel utilizar pela instância do Vue:

this.$btoast("Olá sou um toast!");

// Ou com opções
const id = Vue.prototype.$btoast("Conteúdo do toast", {
  type: "error",
});
// Ao invocar o toast, é retornado um ID único que
// pode ser usado para removê-lo da tela, se necessário.

//Removendo todos os toasts
Vue.prototype.$btoast.clear();

//Removendo um dos toasts (por id)
Vue.prototype.$btoast.dismiss(id);

this.$btoast(conteudo,?props)

this.$btoast.clear()

this.$toast.dismiss(id)

Vue.prototype.$btoast(conteudo,?props)

Vue.prototype.$btoast.clear()

Vue.prototype.$btoast.dismiss(id)

Props

Aqui estão as propriedades disponíveis para o componente b-toast:

| Atributo | Tipo | Inicial | Descrição | | :------- | :-----: | :-------: | :------------------------------------------------------------------------------------------------------------------------------ | | content | String | -- | Define o conteúdo no toast. (requerido) | | type | String | success | Oefine o tipo de toast. Pode ser success, error, warning, info, ou qualquer outro tipo personalizado. | | duration | Number | 3000 | Define a duração em milissegundos que o toast ficará visível antes de ser fechado automaticamente. Padrão: 5000 (5 segundos). | | isDark | Boolean | false | Define o tema padrão do toast. Padrão: false. |

Design Baseado em Pine UI

O design deste projeto de toasts, b-toast, foi desenvolvido com base no Pine UI, um design system moderno e flexível para design de front-end. O Pine UI fornece um conjunto abrangente de componentes e estilos consistentes que ajudaram a moldar a aparência e a experiência do b-toast.

Para obter mais informações sobre o Pine UI, você pode visitar o Pine UI e explorar os recursos e a documentação fornecidos.

Licença

Este projeto está licenciado sob a MIT License.