Simple clock component built with SVG & CSS Animations
Tested in Chrome 70, Firefox 64, Safari 12.0. You should use Array.prototype.flatMap
polyfill for older browsers.
import { CustomClockComponent } from 'custom-clock'
customElements.define('custom-clock', CustomClockComponent)
<custom-clock size="100px" stroke-color="#536dfe"></custom-clock>
You can use existing JavaScript & TypeScript definitions via special import:
import 'custom-clock/dist/src/global-declarations'
Please see the discussion about predefined names.
- size (CSS value for clock width & height)
- stroke-color (CSS value)