mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 15:39:46 +00:00
Added option to apply css classes
This commit is contained in:
parent
88aefe1c4e
commit
17514752d8
@ -1,7 +1,7 @@
|
|||||||
@using AIStudio.Tools
|
@using AIStudio.Tools
|
||||||
@using MudBlazor
|
@using MudBlazor
|
||||||
|
|
||||||
<MudCard Class="my-2 rounded-lg" Outlined="@true">
|
<MudCard Class="@this.CardClasses" Outlined="@true">
|
||||||
<MudCardHeader>
|
<MudCardHeader>
|
||||||
<CardHeaderAvatar>
|
<CardHeaderAvatar>
|
||||||
<MudAvatar Color="@this.Role.ToColor()">
|
<MudAvatar Color="@this.Role.ToColor()">
|
||||||
|
@ -33,6 +33,12 @@ public partial class ContentBlockComponent : ComponentBase
|
|||||||
[Parameter]
|
[Parameter]
|
||||||
public DateTimeOffset Time { get; init; }
|
public DateTimeOffset Time { get; init; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Optional CSS classes.
|
||||||
|
/// </summary>
|
||||||
|
[Parameter]
|
||||||
|
public string Class { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Inject]
|
[Inject]
|
||||||
private Rust Rust { get; init; } = null!;
|
private Rust Rust { get; init; } = null!;
|
||||||
|
|
||||||
@ -107,4 +113,6 @@ public partial class ContentBlockComponent : ComponentBase
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string CardClasses => $"my-2 rounded-lg {this.Class}";
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user