@achiga/notifications 中文文档教程

发布于 4年前 浏览 22 更新于 3年前

@achiga/notifications

NPM

Install

npm install @achiga/notifications

Usage

To use this module, pass in a data object for styles and notification data

Styles structure:

{
  button: {
    backgroundColor: '',
    color: ''
  },
  headline: {
    color: ''
  },
  body: {
    color: ''
  },
  icon: {
    fill: ''
  }
}
Additions 1.1.0 - 
  This package now accepts a boolean from the parent to detect if the mouse has left the browser(required)
  Accepts an optional pageUrl param that will trigger a re-render when the route is changed

Example

import AchigaNotifications from '@achiga/notifications'

class Example extends Component {
  render () {
    return (
      <AchigaNotifications cursorLeftPage={bool} pageUrl={pageUrl} data={notificationData} styles={styles} />
    )
  }
}

License

该项目根据 MIT 许可条款获得许可。

@achiga/notifications

NPMJavaScript Style Guide

Install

npm install @achiga/notifications

Usage

To use this module, pass in a data object for styles and notification data

Styles structure:

{
  button: {
    backgroundColor: '',
    color: ''
  },
  headline: {
    color: ''
  },
  body: {
    color: ''
  },
  icon: {
    fill: ''
  }
}
Additions 1.1.0 - 
  This package now accepts a boolean from the parent to detect if the mouse has left the browser(required)
  Accepts an optional pageUrl param that will trigger a re-render when the route is changed

Example

import AchigaNotifications from '@achiga/notifications'

class Example extends Component {
  render () {
    return (
      <AchigaNotifications cursorLeftPage={bool} pageUrl={pageUrl} data={notificationData} styles={styles} />
    )
  }
}

License

This project is licensed under the terms of the MIT license.

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文