Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@ttoss/notifications

Package Overview
Dependencies
Maintainers
2
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ttoss/notifications

ttoss notifications module.

npmnpm
Version
1.18.0
Version published
Weekly downloads
55
400%
Maintainers
2
Weekly downloads
 
Created
Source

@ttoss/notifications

About

This module handles notifications in your applications and other ttoss modules.

Getting Started

Install

yarn add @ttoss/{notifications,ui}

Usage

Provider

Add a provider on top of your application.

import { NotificationsProvider } from '@ttoss/notifications';
import { ThemeProvider } from "@ttoss/ui";

ReactDOM.render(
  <React.StrictMode>
    <ThemeProvider>
      <NotificationsProvider>
        <App />
      </NotificationsProvider>
    </ThemeProvider>
  </React.StrictMode>,
  document.getElementById('root')

Loading

This modules provides a global loading bar that you can use on every part of your App.

import { useNotifications } from '@ttoss/notifications';

const Component = () => {
  const { loading, setLoading } = useNotifications();

  return (
    <div>
      <button onClick={() => setLoading(true)} disabled={isLoading}>
        Click Me!
      </button>
    </div>
  );
};

Keywords

React

FAQs

Package last updated on 13 Dec 2022

Did you know?

Socket

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