Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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.