0.0.11 • Published 3 years ago

@web-lite/snackbar v0.0.11

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

snackbar

Installation

yarn add react-toastify @web-lite/snackbar

Note

This package has been built on top of followings

    "@material-ui/core": "^4.11.3",
    "@material-ui/icons": "^4.11.2",
    "clsx": "^1.1.1",
    "react": "^16.8.0  || ^17.0.0",
    "react-dom": "^16.8.0  || ^17.0.0"

You may need to install every dependencies which has not been installed yet

🩰 Hopefully it won't need any thing to install

Example

import SnackbarContainer, { sb, globals } from '@web-lite/snackbar'
import '@web-lite/snackbar/style.min.css'

export default function App() {
  const content = {
    title: 'Poison Quotes',
    message:
      'Cheers for everyone who is man, cause everyone who is man, is different from every man.',
    config: {
      position: globals.SNACKBAR_POSITIONS.TOP_CENTER,
      closeOnClick: true,
    },
  }

  return (
    <div className="App">
      <h1>Hello CodeSandbox</h1>
      <h2>Start editing to see some magic happen!</h2>
      <button onClick={sb.success.bind(null, content)}>show success</button>
      <button onClick={sb.info.bind(null, content)}>show info</button>
      <button onClick={sb.warn.bind(null, content)}>show warn</button>
      <button onClick={sb.error.bind(null, content)}>show error</button>
      <SnackbarContainer limit={3} rtl={true} />
    </div>
  )
}

setTimeout(() => sb.success({ title: 'second Title' }), 10000)
0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8-0

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago