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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.5.51latest

Version History

VersionDownloads (Last 7 Days)Published
1.5.51
1.5.41
1.5.31
1.5.11
1.5.01
1.5.21
1.4.21
1.4.1-d1
1.4.11
1.4.01
1.2.101
1.2.91
1.2.81
1.2.71
1.2.61
1.2.5-b1
1.2.51
1.2.41
1.2.32
1.2.21
1.2.01
1.1.11
1.0.01

Package Sidebar

Install

npm i play-cricket-react-components

Weekly Downloads

24

Version

1.5.5

License

ISC

Unpacked Size

485 kB

Total Files

38

Last publish

Collaborators

  • smangio