# Sports widget

Sports Widgets is available as an npm package and can be used across multiple
sites to display data for different Sports events.

## Installation

<hr />
Install the required node packages via NPM or Yarn

```bash
$ yarn add react react-dom sports-widget
```

## Non-React app

There is already an example located at `odds-widget-html` folder,

but here is the manual:

---

> Create an HTML element which will serve as a container for the widget

```html
<div id="root" />
```

---

> Import required packages

```js
import React from "react";
import ReactDOM from "react-dom";
import { EventDetails } from "sports-widget";
```

---

> Render the widget:

```js
$(document).ready(function () {
  const element = React.createElement;
  ReactDOM.render(element(EventDetails), document.getElementById("root"));
});
```