| 1234567891011121314151617181920212223242526 |
- using Spry;
- /**
- * StatCardComponent - A statistics display card
- *
- * Shows a large value with a label underneath
- */
- public class StatCardComponent : Component {
-
- public string value { set; get; default = "0"; }
- public string label { set; get; default = "Stat"; }
-
- public override string markup { get {
- return """
- <div class="stat-card">
- <div class="stat-value" sid="value"></div>
- <div class="stat-label" sid="label"></div>
- </div>
- """;
- }}
-
- public override async void prepare() throws Error {
- this["value"].text_content = value;
- this["label"].text_content = label;
- }
- }
|