announcekit-react
Advanced tools
Comparing version 1.1.0 to 1.2.0
{ | ||
"name": "announcekit-react", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Use AnnounceKit widgets in your React App", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -7,4 +7,6 @@ ![](https://announcekit.app/images/logo@2x.png) | ||
[Live demo](https://announcekit.app/widgets) | ||
[Live demo](https://codesandbox.io/s/announcekit-react-demo-gfrt1) | ||
[Documentation](https://announcekit.app/docs/reactjs) | ||
## Installation | ||
@@ -19,21 +21,28 @@ | ||
```js | ||
import React from 'react'; | ||
import AnnouncekitWidget from 'announcekit-react'; | ||
import React from "react"; | ||
import AnnounceKit from "announcekit-react"; | ||
class App extends React.Component { | ||
render() { | ||
return ( | ||
<div> | ||
<nav> | ||
class App extends React.Component { | ||
render() { | ||
return ( | ||
<div> | ||
<nav> | ||
<ul> | ||
<li>Home</li> | ||
<li>Product</li> | ||
<li>News <AnnouncekitWidget widget="https://announcekit.app/widget/eL8Lm" /></li> | ||
<ul> | ||
</nav> | ||
</div> | ||
) | ||
} | ||
<li> | ||
News <AnnounceKit widget="https://announcekit.app/widget/eL8Lm" /> | ||
</li> | ||
<li> | ||
<a className="click-trigger" href="#"> | ||
Click here | ||
</a> | ||
<AnnounceKit catchClick=".click-trigger" widget="https://announcekit.app/widget/eL8Lm" /> | ||
</li> | ||
</ul> | ||
</nav> | ||
</div> | ||
); | ||
} | ||
} | ||
``` | ||
@@ -49,6 +58,6 @@ | ||
- `floatWidget` - Set true if the widget is a Float widget. | ||
- `widgetInit` - Called after the widget has been successfully loaded. | ||
- `widgetOpen` - Called when the widget is opened. | ||
- `widgetClose` - Called when the widget is closed. | ||
- `widgetResize` - Called when the widget is resized. | ||
- `widgetUnread` - Called when unread post count of widget has been updated. | ||
- `userData` - User properties (for user tracking) | ||
- `onWidgetOpen` - Called when the widget is opened. | ||
- `onWidgetClose` - Called when the widget is closed. | ||
- `onWidgetResize` - Called when the widget is resized. | ||
- `onWidgetUnread` - Called when unread post count of widget has been updated. |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12088
248
61