Socket
Socket
Sign inDemoInstall

modal-toast

Package Overview
Dependencies
8
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    modal-toast

Instalação do modal toast.


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Modal Toast

Instalação do modal toast.

npm i modal-toast

Importação do pacote.

import NotifyContent, { notify } from 'modal-toast';

Adicione o NotifyContent dentro do seu componente principal, exemplo:

function App(){
  return(
    <>
      <NotifyContent />
      <div class="App>
        ...
      </div>
    </>
  )
}

Utilizando a chamada do modal:


 function handleModalDark() {
        notify.show({
            title: "Titulo",
            text:"Mensagem de texto",
            type: "danger",
            type: "danger",
            schema: "dark"
        });
    }
    function handleModalLight() {
        notify.show({
            title: "Titulo",
            text:"Mensagem de texto",
            type: "danger",
            type: "danger",
            schema: "light"
        });
    }

Fechando um modal

  notify.hide();

Criando uma interação fetch



 function handleModalLight() {
        notify.show({
            title: "Titulo",
            text:"Mensagem de texto",
            type: "danger",
            schema: "light",
            onProcess: () => {
              console.log("Executando seu processo aqui")
            },
            onProcessName: "Nome a ser exibido no botão"
        });
    }

Faça uma doação para ajudar meu projeto a seguir em frente

Doar agora

FAQs

Last updated on 02 Aug 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc