PreviewBadge
Reusable preview badge component.
Usage
Components are auto-discovered. Use the component directly in any .wrn view:
<PreviewBadge label="Preview" variant="default" />Legacy mount name: data-component="PreviewBadge".
Props and attributes
| Prop | Type | Requirement | Default |
|---|---|---|---|
label | string | Optional | "Preview" |
variant | string | Optional | "default" |
class | string | Optional | "" |
Slots
default
Events
This component does not declare a custom event.
Source contract
Installed source: components/PreviewBadge.wrn
component PreviewBadge {
props {
label = "Preview"
variant = "default"
class = ""
}
view { <span class="wire-badge wire-badge--{variant} wire-catalog-badge wire-catalog-badge--previewbadge {class}">{label}<slot /></span> }
}