microsoft/teams.net

Public

mirrored fromhttps://github.com/microsoft/teams.netAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
copilot/sub-pr-338

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

core/samples/CompatBot/Cards.cs

65lines · modecode

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4using System.Text.Json;
5using System.Text.Json.Nodes;
6
7namespace CompatBot;
8
9internal class Cards
10{
11
12 public static object ResponseCard(string? feedback) => new
13 {
14 type = "AdaptiveCard",
15 version = "1.4",
16 body = new object[]
17 {
18 new
19 {
20 type = "TextBlock",
21 text = "Form Submitted Successfully! ✓",
22 weight = "Bolder",
23 size = "Large",
24 color = "Good"
25 },
26 new
27 {
28 type = "TextBlock",
29 text = $"You entered: **{feedback ?? "(empty)"}**",
30 wrap = true
31 }
32 }
33 };
34
35 public static readonly object FeedbackCardObj = new
36 {
37 type = "AdaptiveCard",
38 version = "1.4",
39 body = new object[]
40 {
41 new
42 {
43 type = "TextBlock",
44 text = "Please provide your feedback:",
45 weight = "Bolder",
46 size = "Medium"
47 },
48 new
49 {
50 type = "Input.Text",
51 id = "feedback",
52 placeholder = "Enter your feedback here",
53 isMultiline = true
54 }
55 },
56 actions = new object[]
57 {
58 new
59 {
60 type = "Action.Execute",
61 title = "Submit Feedback"
62 }
63 }
64 };
65}
66