27 lines
634 B
Markdown
27 lines
634 B
Markdown
|
# 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`:
|
||
|
|
||
|

|