🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@codeftw/future-web-ui-alert

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codeftw/future-web-ui-alert

Library Component React UI Alert

latest
Source
npmnpm
Version
1.0.5
Version published
Maintainers
2
Created
Source

UI Alert

npm version

Installation

npm install @codeftw/future-web-ui-alert

Usage

  • Add AlertProvider wrapping your App
import { AlertProvider } from '@codeftw/future-web-ui-alert';


  render(
    <ApolloProvider client={client}>
      <MuiThemeProvider theme={theme}>
        <TunnelProvider>
          <AlertProvider>
            <BrowserRouter>
              <AppContainer/>
            </BrowserRouter>
          </AlertProvider>
        </TunnelProvider>
      </MuiThemeProvider>
    </ApolloProvider>,
    document.getElementById('app')
  );
  • Add the Alert component somewhere in your App
import { Alert } from '@codeftw/future-web-ui-alert';

<Alert />
  • Use our HOC withAlert to have access to showAlert function
import { withAlert } from '@codeftw/future-web-ui-alert';

const AddTask = withAlert(({showAlert}) => {
   ...
   showAlert('Task added');
   ...
});

Keywords

js

FAQs

Package last updated on 08 Feb 2019

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