Nourishing Plushie Monster

    bridge-notification-svelte

    1.1.0 • Public • Published

    Bridge Notifications

    Bridge Notification

    Demonstration

    https://bridge-notification.netlify.app

    Getting started

    npm install --save bridge-notification-svelte

    Basic usage

    // App.svelte
     
    <script>
      import BridgeNotify from "bridge-notification-svelte";
      <main>
        <BridgeNotify />
        ...
      </main>
    </script>
    // ChildrenComponent.svelte
     
    <script>
      import { notify } from "bridge-notification-svelte";
     
      function show(position) {
        notify({
          message: "Bridge Notification is Awesome 😍",
          type: 'success',
          duration: 3000,
          position: 'center,
          animate: {
                y: 100,
                x: 0,
                duration: 500
          }
        });
      }
    </script>
     
    <button on:click={show}> Show Notification </button>

    Providing custom style component

    // ChildrenComponent.svelte
     
    import { notify } from "bridge-notification-svelte";
     
      function show(position) {
        notify({
          message: "Bridge Notification is Awesome 😍",
          type: 'success',
          duration: 3000,
          position: 'center,
          animate: {
                y: 100,
                x: 0,
                duration: 500
          },
          style:'backgound-color:blue;color:black'
        });
      }
    </script>
     
    <button on:click={show}> Show Notification </button>

    Install

    npm i bridge-notification-svelte

    DownloadsWeekly Downloads

    1

    Version

    1.1.0

    License

    ISC

    Unpacked Size

    5.29 kB

    Total Files

    6

    Last publish

    Collaborators

    • bitfumes