0.3.0 • Published 4 years ago

xy-notification v0.3.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago
IEChromeFirefoxOperaSafari
IE 10+ ✔Chrome 31.0+ ✔Firefox 31.0+ ✔Opera 30.0+ ✔Safari 7.0+ ✔

NPM version node version npm download

xy-notification

xy-notification


通知组件,从屏幕某一侧滑入通知信息。

安装

# yarn
yarn add xy-notification

使用例子

import React from "react";
import ReactDOM from "react-dom";
import { noticePopup } from "xy-notification";

const close = noticePopup({
    duration: 3000,
    closeBtn: <span className="xy-close">✖</span>,
    children: <p>弹出内容</p>,
});

API

Notice

属性说明类型默认值
children通知内容React.ReactNode
closeBtn关闭按钮React.ReactNode
placement通知滑出方向"topLeft"/"topRight"/"bottomLeft"/"bottomRight"
visible是否可视boolean
defaultVisible默认是否可视boolean
duration过度时间number
onClose通知关闭事件Function
onUnmount通知关闭动画结束Function

开发

yarn run start

例子

http://localhost:6006

测试

yarn run test

开源许可

xy-notification is released under the MIT license.

0.3.0

4 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.91

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago