x-react-clock

A custom element wrapper for react-clock.

Usage no npm install needed!

<script type="module">
  import xReactClock from 'https://cdn.skypack.dev/x-react-clock';
</script>

README

x-react-clock

A custom element wrapper for react-clock.

Demo an unpkg installation

Everything defined in one file, without a build step @ https://j.mp/2Hsutor.

Usage with NPM

Install

npm i x-react-clock

Import

import * as XReactClock from 'x-react-clock'

Define

window.customElements.define('x-react-clock', XReactClock.default)

Declare

<x-react-clock rendernumbers size="150"></x-react-clock>

Style

Styles are extracted from react-clock and placed in separate css files. Apply them, or the clock will be blank when first viewed. See the demo for an example.