Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alisenola/wert-react-module
React Component for integrating Wert widget.
https://github.com/alisenola/wert-react-module
Last synced: about 7 hours ago
JSON representation
React Component for integrating Wert widget.
- Host: GitHub
- URL: https://github.com/alisenola/wert-react-module
- Owner: alisenola
- Created: 2023-10-27T13:45:26.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-27T13:50:43.000Z (about 1 year ago)
- Last Synced: 2024-07-15T09:24:59.973Z (4 months ago)
- Language: TypeScript
- Size: 67.4 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Wert Module React component
This is a wrapped [Wert initializer helper](https://www.npmjs.com/package/@wert-io/widget-initializer) for React projects.
## Installation
```
yarn add @wert-io/module-react-component
```or
```
npm install @wert-io/module-react-component
```## Usage example
```
import WertModule from '@wert-io/module-react-component';class App extends React.Component {
constructor(props) {
super(props);this.state = {
wertOptions: {
partner_id: '{{YOUR_PARTNER_ID}}',
listeners: {
loaded: () => console.log('loaded'),
},...
},
};
}render() {
return (
);
}
}
```You can find the Whole list of options [here](https://www.npmjs.com/package/@wert-io/widget-initializer#documentation).
Component reacts to **options.theme** and **options.color_{name}** values change and ignores others.