sports-widget
v1.0.23
Published
Sports Widgets is available as an npm package and can be used across multiple sites to display data for different Sports events.
Downloads
55
Readme
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
$ 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
<div id="root" />
Import required packages
import React from "react";
import ReactDOM from "react-dom";
import { EventDetails } from "sports-widget";
Render the widget:
$(document).ready(function () {
const element = React.createElement;
ReactDOM.render(element(EventDetails), document.getElementById("root"));
});