Bus UI Status

ResultPanel summarizes an operation.

Use ResultPanel after a submission, import, or provider action needs a visible outcome with optional follow-up actions.

Public API

Functionui.ResultPanel
Propsui.ResultPanelProps
Use forOperation outcomes with title, summary, status, and actions.

Example

Loading ResultPanel demo...

Go API

import (
  gx "github.com/busdk/bus-gx/pkg/gx"
  ui "github.com/busdk/bus-ui/pkg/ui"
)

node, err := ui.ResultPanel(ui.ResultPanelProps{
  Status:  ui.StatusSuccess,
  Title:   "Import complete",
  Summary: "12 rows were accepted.",
})

html, err := gx.RenderHTML(node)

In .gx source, wrap the result helper and expose only the reader-facing strings as attributes.

In .gx source, the result panel is a markup section with title and summary props.

.gx source

package statusui

import gx "github.com/busdk/bus-gx/pkg/gx"

type ImportResultProps struct {
  Title string
  Summary string
}

func ImportResult(props ImportResultProps) gx.Node {
  return <section class="result-panel">
  <h2><Text value={props.Title}></Text></h2>
  <p><Text value={props.Summary}></Text></p>
</section>
}

var result = <ImportResult title={"Import complete"} summary={"12 rows were accepted."}></ImportResult>