Bus UI Status
StatusPill labels compact state.
Use StatusPill when a row, summary, or result needs a short semantic status label.
Public API
| Function | ui.StatusPill |
|---|---|
| Props | ui.StatusPillProps |
| Use for | Compact labels such as ready, working, warning, or failed. |
Example
Loading StatusPill demo...
Go API
import (
gx "github.com/busdk/bus-gx/pkg/gx"
ui "github.com/busdk/bus-ui/pkg/ui"
)
node, err := ui.StatusPill(ui.StatusPillProps{
Label: "Ready",
Status: ui.StatusSuccess,
})
html, err := gx.RenderHTML(node)
In .gx source, wrap the status helper and keep the
status constant in Go while markup passes the label.
In .gx source, a status pill is compact inline markup with its label supplied by props.
.gx source
package statusui
import gx "github.com/busdk/bus-gx/pkg/gx"
type ImportStatusProps struct {
Status string
}
func ImportStatus(props ImportStatusProps) gx.Node {
return <span class="status-pill">
<Text value={props.Status}></Text>
</span>
}
var status = <ImportStatus status={"Ready"}></ImportStatus>