0.1.6 • Published 3 years ago

uptime-widget v0.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Uptime Widget

A web component that presents an uptime graph for the status of the Ably realtime network over the last 90 days.

Load the web component definition

Directly load the component from a CDN

<script type="module">
  // Alternative CDN (https://www.skypack.dev/view/uptime-widget)
  import "https://cdn.skypack.dev/uptime-widget";
</script>

Alternatively install using NPM

npm install -S uptime-widget

And use it in your javascript ...

// the WebComponent definition auto executes
import "uptime-widget";

Place the custom HTML tag in the DOM

<uptime-widget
  serverURL="https://status.ably.com/embed/uptime.json"
  href="https://status.ably.com"
  text="visit status site"
/>
  • serverURL the JSON endpoint that serves the 90 day data, and legend metadata
  • href and text - are optional, and create the call-to-action link

CSS styling the CTA link

Web Componets can not be styled. The internal styling belongs to the component, however the author can expose a part to the external host, which can be styled using the ::part() psuedo selector.

uptime-widget::part(cta) {
	color: red;
}

The background-color and color of this widget are inherited values from the host.

0.1.6

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.5

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.17

3 years ago

0.0.16

3 years ago

0.0.15

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago