-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathSettingsAiProviderCard.razor
More file actions
86 lines (65 loc) · 2.63 KB
/
SettingsAiProviderCard.razor
File metadata and controls
86 lines (65 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
@namespace PrompterOne.Shared.Components.Settings
<SettingsExpandableCard Title="@Title"
Subtitle="@Subtitle"
StatusLabel="@StatusLabel"
StatusClass="@StatusClass"
IconStyle="@IconStyle"
AdditionalCssClass="@AdditionalCssClass"
IsOpen="@IsOpen"
OnToggle="@OnToggle"
TestId="@TestId">
<Icon>
@if (Icon is not null)
{
@Icon
}
</Icon>
<ChildContent>
@if (ChildContent is not null)
{
@ChildContent
}
<div class="set-path-field" style="margin-top:12px">
<button class="set-btn-golden set-btn-sm"
type="button"
data-testid="@SaveTestId"
@onclick="Save"
@onclick:stopPropagation="true">
Save locally
</button>
<button class="set-btn-outline set-btn-sm"
type="button"
data-testid="@ClearTestId"
@onclick="Clear"
@onclick:stopPropagation="true">
Clear
</button>
</div>
@if (!string.IsNullOrWhiteSpace(Message))
{
<p class="set-card-copy"
data-testid="@MessageTestId">
@Message
</p>
}
</ChildContent>
</SettingsExpandableCard>
@code {
[Parameter] public string AdditionalCssClass { get; set; } = string.Empty;
[Parameter] public RenderFragment? ChildContent { get; set; }
[Parameter] public EventCallback Clear { get; set; }
[Parameter] public string ClearTestId { get; set; } = string.Empty;
[Parameter] public RenderFragment? Icon { get; set; }
[Parameter] public string IconStyle { get; set; } = string.Empty;
[Parameter] public bool IsOpen { get; set; }
[Parameter] public string Message { get; set; } = string.Empty;
[Parameter] public string MessageTestId { get; set; } = string.Empty;
[Parameter] public EventCallback OnToggle { get; set; }
[Parameter] public EventCallback Save { get; set; }
[Parameter] public string SaveTestId { get; set; } = string.Empty;
[Parameter] public string StatusClass { get; set; } = string.Empty;
[Parameter] public string StatusLabel { get; set; } = string.Empty;
[Parameter] public string Subtitle { get; set; } = string.Empty;
[Parameter] public string TestId { get; set; } = string.Empty;
[Parameter] public string Title { get; set; } = string.Empty;
}