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.