Wondering what’s next for npm?Check out our public roadmap! »

    @invisionag/iris-react-flash-message

    4.5.1 • Public • Published
    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

    Keywords

    none

    Install

    npm i @invisionag/iris-react-flash-message

    DownloadsWeekly Downloads

    201

    Version

    4.5.1

    License

    MIT

    Unpacked Size

    26.1 kB

    Total Files

    7

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar