Netweak-Badges/README.md

27 lines
634 B
Markdown
Raw Permalink Normal View History

2025-03-07 17:16:54 -05:00
# Netweak Badges
Netweak badges, built for Astro.
> [!NOTE]
> Your Astro website must output to Server-Side Rendering.
## Usage
Import component:
```jsx
import {SmallBadge} from "@sudovanilla/netweak-badges"
```
Create badge for overall status:
```jsx
<SmallBadge Page="status.example.org"/>
```
Create badge for specific service:
```jsx
<SmallBadge Page="status.example.org" Service="2"/>
```
To assign it to a specific service, take a look at your JSON response and use the number assigned to the service under `services`:
![JSON Response](https://ocean.sudovanilla.org/media/images/Screenshot-From-2025-03-06-23-35-18.png)