Socket
Book a DemoInstallSign in
Socket

@invisionag/iris-react-flash-message

Package Overview
Dependencies
Maintainers
22
Versions
184
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@invisionag/iris-react-flash-message

```js import FlashMessage from '@invisionag/iris-react-flash-message'; ```

latest
Source
npmnpm
Version
4.5.2
Version published
Maintainers
22
Created
Source
import FlashMessage from '@invisionag/iris-react-flash-message';

A general single flash message.

Basic Usage:

type Props = {
  text: string,
  type: 'success' | 'error',
  onDismiss: string => any,
};

<FlashMessage text={text} type={type} onDismiss={onDismiss} />

autoDismiss:

When passing the autoDismiss prop, the flash message will automatically invoke the passed onDismiss callback after an amount of ms specified in iris settings. The lifespan timer will pause when the Flash Message receives a mouseover event and start up again on mouseleave.

<FlashMessage text="My days are numbered :(" lifespan={2500} onDismiss={onDismiss} />

If autoDismiss is not passed, the message will stay on screen indefinitely.

mouseEnter

FAQs

Package last updated on 28 Jun 2021

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