rsba-notification
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

rsba-notification

Made with create-react-library

NPM JavaScript Style Guide

Install

npm install --save rsba-notification

settings

type IziToastPosition = 'bottomRight' | 'bottomLeft' | 'topRight' | 'topLeft' | 'topCenter' | 'bottomCenter' | 'center';
type IziToastTransitionIn = 'bounceInLeft' | 'bounceInRight' | 'bounceInUp' | 'bounceInDown' | 'fadeIn' | 'fadeInDown' | 'fadeInUp' | 'fadeInLeft' | 'fadeInRight' | 'flipInX';
type IziToastTransitionOut = 'fadeOut' | 'fadeOutUp' | 'fadeOutDown' | 'fadeOutLeft' | 'fadeOutRight' | 'flipOutX';
type immediateTypes = 'info' | 'error' | 'warning' | 'success' | 'question';

Usage

import React, {useEffect} from 'react'

import {defaultNotification, useNotification, notification } from 'rsba-notification'

const App = () => {
  const otherShowMessage = useNotification({position: 'topRight', message: 'Hi, how it is going'})

  useEffect(() => {
    notification('info', {
      message: 'Hi, how it is going',
      position: 'topRight'
    })
    defaultNotification("I am a default notification")
  });

  return (
    <div>
      <button onClick={() => otherShowMessage()} >Show</button>
    </div>
  )
};

export default App

License

MIT © Feujo

Readme

Keywords

none

Package Sidebar

Install

npm i rsba-notification

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

78.4 kB

Total Files

11

Last publish

Collaborators

  • feujo