Skip to content

GenericModalContent

GenericModalContent

Generic OK/Cancel dialog body — title banner, info body, labeled primary button.

Package

SusGame · Screens (commercial)

Open in Playground

SusGame · Screens

Props

NameTypeDefault
TitleTextProp<string>""
BodyTextProp<string>""
OkLabelProp<string>"OK"

Slots

No slots.

Events

No public events.

Style hooks

USS class contract — override appearance without touching C#. States toggle via these classes:

  • generic-modal-content
  • sus-flow-actions-row
  • sus-flow-btn--mr12

Usage

xml
<template>
  <sus:GenericModalContent
    :TitleText="Title.Value"
    :BodyText="Body.Value"
    :OkLabel="Ok.Value"
  />
</template>

<script>
public Prop<string> Title = new("Confirm");
public Prop<string> Body = new("Proceed?");
public Prop<string> Ok = new("OK");
</script>
csharp
var dlg = new GenericModalContent();
dlg.TitleText.Value = "Delete item?";
dlg.BodyText.Value = "This cannot be undone.";
dlg.OkLabel.Value = "Delete";
dlg.OkBtn.OnClick += () => { /* confirm */ };
dlg.CancelBtn.OnClick += () => { /* dismiss */ };
Prop / APIRole
TitleTextHeading banner
BodyTextBody SusAlert (info)
OkLabelPrimary button label
OkBtn / CancelBtnHost action wiring

Notes

  • Content-only; host supplies modal chrome / dismiss.
  • Cancel label is fixed («Cancel») — only OK is prop-driven.