snackbar-simple-react

snackbar simple react

Usage no npm install needed!

<script type="module">
  import snackbarSimpleReact from 'https://cdn.skypack.dev/snackbar-simple-react';
</script>

README

Snackbar Simple React

This is a react component of a simple snack bar wit customization features,

it use font awesome (fa fa-phone) for the icons .

Dependencies

If you want icons you have to enable font awesome on your app, click on this link

Installation

npm install snackbar-simple-react 

Usage

import SnackbarSimpleReact from 'snackbar-simple-react';
          <SnackbarSimpleReact
      text={""}
      isVisible={true},
      backgroundColor=""
      textColor=""
      borderColor=""
      classIcon=""
      showTime={2000},
          />

          //use your setIsVisible prop like this setIsVisible(!isVisible)

Props

text type string --text to show on snackbar visible

backgroundColor type string color of the snackbar background

textColor type string .-- color of the text on snackbar

borderColor type string -- color of the snackbar border

classIcon type string -- use font awesome icons ex. "fa fa-phone" "fa fa-cross"

showTime type number -- the duration of your snackbar on miliseconds

isVisible type bool -- is visible snackbar

License

MIT