const TypeCaution, TypeInfo, TypeNote, TypeSuccess, TypeTip, TypeWarning
Types of alerts.
v0 - Unaudited: This is an initial version that has not yet been formally audited. A fully audited version will be pu...
v0 - Unaudited This is an initial version of this package that has not yet been formally audited. A fully audited version will be published as a subsequent release. Use in production at your own risk.
Package mdalert provides support for creating Markdown alerts with standard alert types (note, tip, important, warning, caution).
v0 - Unaudited: This is an initial version that has not yet been formally audited. A fully audited version will be published as a subsequent release. Use in production at your own risk.
Package mdalert provides support for creating Markdown alerts.
Package mdalert provides support for creating Markdown alerts.
It defines supported alert types and helper functions that can be called to generate Markdown for different alert types.
The different alert types are documented in the Markdown docs realm: https://gno.land/r/docs/markdown#alerts
Caution returns an alert Markdown of type caution.
Cautionf returns an alert Markdown of type caution with a formatted message.
Info returns an alert Markdown of type info.
Infof returns an alert Markdown of type info with a formatted message.
Note returns an alert Markdown of type note.
Notef returns an alert Markdown of type note with a formatted message.
Success returns an alert Markdown of type success.
Notef returns an alert Markdown of type success with a formatted message.
Tip returns an alert Markdown of type tip.
Tipf returns an alert Markdown of type tip with a formatted message.
Warning returns an alert Markdown of type warning.
Warningf returns an alert Markdown of type warning with a formatted message.
New creates a new alert.
1type Alert struct {
2 // Type defines the type of alert.
3 Type Type
4
5 // Title contains an optional title for the alert.
6 Title string
7
8 // Message contains alerts's message.
9 Message string
10
11 // Folded indicates that the alert must be folded on render.
12 // Message is not initially visible when folded, only title is visible.
13 Folded bool
14}Alert defines a type for alerts.
Type defines a type for the alert types.