New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@redbuck/notification

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@redbuck/notification

notification

latest
npmnpm
Version
1.1.2
Version published
Maintainers
1
Created
Source

@redbuck/notification

简介

一个简单的弹窗提示组件

使用

import Notification from "@redbuck/notification";

var win = new Notification({
  title: '标题',
  content: `
      <div>
        <p>hello notification</p>
      </div>
    `,
  duration: 0
});

win.show();

参数


enum Position {
  "top-left" = "top-left",
  "top-center" = "top-center",
  "top-right" = "top-right",
  "center-left" = "center-left",
  "center-center" = "center-center",
  "center-right" = "center-right",
  "bottom-left" = "bottom-left",
  "bottom-center" = "bottom-center",
  "bottom-right" = "bottom-right",
}

type Option = {
  container: HTMLElement; // 父容器
  constrain: HTMLElement; // 约束范围
  duration: number; // 显示时间
  draggable: boolean; // 是否可拖拽
  title: string;
  content: string;
  closeable: boolean;
  namespace: string;
  position: Position;
  style: string;
  maxCount: number; // 同位置最大显示数量
  distance: number; // 同位置距离
};

Keywords

notification

FAQs

Package last updated on 26 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts