1.12.2 • Published 12 months ago

@cabezonidas/react-toast v1.12.2

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

react-toast

GitHub Netlify Status Storybook

Headless toaster for React apps

Toasts Provider for React apps

import React from "react";
import ReactDOM from "react-dom/client";

// Include stylesheet in your application
import "@cabezonidas/react-toast/index.css";

const rootElement = document.getElementById("root")!;
const root = ReactDOM.createRoot(rootElement);

// Include the toast provider
root.render(
  <React.StrictMode>
    <ToastProvider>
      <App />
    </ToastProvider>
  </React.StrictMode>
);


const App = () => {
  const { toast } = useToast();
  return (
    <div className="App">
      <button
        type="button"
        onClick={() => toast('Some text')}
      >
        Toast
      </button>
    </Splitterdiv>
  )
}

Open examples on CodeSandbox

CodeSandbox example

1.12.2

12 months ago

1.12.1

12 months ago

1.12.0

1 year ago

1.11.0

1 year ago

1.10.0

1 year ago

1.9.0

1 year ago

1.8.0

1 year ago

1.7.0

1 year ago

1.6.0

1 year ago