tailwind-toastify
TypeScript icon, indicating that this package has built-in type declarations

1.0.8 • Public • Published

Install

npm install tailwind-toastify

Requirements

Have tailwindcss 3.x installed in your react project. Tailwindcss

Demo

Demo in codesandbox

Demo online

Usage

import React from 'react';
import { showAlert } from 'tailwind-toastify';
    
export default function ShowAlertExampleApp(){

  const handleShowAlert = (type, title, message) => {
      showAlert(type, title, message);
  }

  return(
      <>
          <button type="button" onClick={()=>handleShowAlert('success', "Success", 'Showing success tailwind alert')}>Show Alert Success</button><br/>
          <button type="button" onClick={()=>handleShowAlert('error', "Error", 'Showing error tailwind alert')}>Show Alert Error</button><br/>
          <button type="button" onClick={()=>handleShowAlert('info', "Info", 'Showing info tailwind alert')}>Show Alert Info</button><br/>
      </>
  )
}

Contribute

José Daniel Garcés Ospina

Package Sidebar

Install

npm i tailwind-toastify

Weekly Downloads

53

Version

1.0.8

License

MIT

Unpacked Size

168 kB

Total Files

9

Last publish

Collaborators

  • jdanigo