play-cricket-react-components

1.5.5 • Public • Published

Play Cricket React Components

This is a react UI/components library intended for the Play Cricket site.

Contents

Usage

🚀 Getting started

Include this script tag in the Play Cricket site:

<script src="https://unpkg.com/play-cricket-react-components@latest" crossorigin></script>

Example usage in HTML page

<body onload="setup()">
  <script>
    function setup() {
      renderComponent({type: 'Heading', props: { text: 'Hello world', color: 'white' }, elementId: 'react-test'});
    }
  </script>
  ...

📖 API Overview

This library will expose the

renderComponent({})

function which takes in an object {} with these properties as an arg:

  • type string
  • props object
  • elementId string

Example

The following snippet will render the <Heading /> component within a <div id="club-heading"></div> element in the Play Cricket site, outputting the message 'Hello World!'.

renderComponent({type: 'Heading', props: { text: 'Hello World!' }, elementId: 'club-heading'})

🔍 API Reference

To be updated

Contributing

Local installation

npm install

Readme

Keywords

none

Package Sidebar

Install

npm i play-cricket-react-components

Weekly Downloads

1

Version

1.5.5

License

ISC

Unpacked Size

485 kB

Total Files

38

Last publish

Collaborators

  • smangio