GenericModalContent

Generic OK/Cancel dialog body — title banner, info body, labeled primary button.
Package
SusGame · Screens (commercial)
SusGame · Screens
Props
| Name | Type | Default | |
|---|---|---|---|
TitleText | Prop<string> | "" | |
BodyText | Prop<string> | "" | |
OkLabel | Prop<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-contentsus-flow-actions-rowsus-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 / API | Role |
|---|---|
TitleText | Heading banner |
BodyText | Body SusAlert (info) |
OkLabel | Primary button label |
OkBtn / CancelBtn | Host action wiring |
Notes
- Content-only; host supplies modal chrome / dismiss.
- Cancel label is fixed («Cancel») — only OK is prop-driven.