mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 21:39:46 +00:00
Allow additional styles & fixes missed min. width
This commit is contained in:
parent
91975d0b28
commit
d08be4103e
@ -1,6 +1,6 @@
|
|||||||
@inherits MSGComponentBase
|
@inherits MSGComponentBase
|
||||||
|
|
||||||
<div class="@this.Classes" style="flex-grow: 1; overflow: hidden;">
|
<div class="@this.Classes" style="@this.Styles">
|
||||||
@if (this.HeaderContent is not null)
|
@if (this.HeaderContent is not null)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
|
@ -26,6 +26,9 @@ public partial class InnerScrolling : MSGComponentBase
|
|||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public string? MinWidth { get; set; }
|
public string? MinWidth { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public string Style { get; set; } = string.Empty;
|
||||||
|
|
||||||
[CascadingParameter]
|
[CascadingParameter]
|
||||||
private MainLayout MainLayout { get; set; } = null!;
|
private MainLayout MainLayout { get; set; } = null!;
|
||||||
@ -66,10 +69,14 @@ public partial class InnerScrolling : MSGComponentBase
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private string MinWidthStyle => string.IsNullOrWhiteSpace(this.MinWidth) ? string.Empty : $"min-width: {this.MinWidth};";
|
private string MinWidthStyle => string.IsNullOrWhiteSpace(this.MinWidth) ? string.Empty : $"min-width: {this.MinWidth}; ";
|
||||||
|
|
||||||
|
private string TerminatedStyles => string.IsNullOrWhiteSpace(this.Style) ? string.Empty : $"{this.Style}; ";
|
||||||
|
|
||||||
private string Classes => this.FillEntireHorizontalSpace ? $"{this.Class} d-flex flex-column flex-grow-1" : $"{this.Class} d-flex flex-column";
|
private string Classes => this.FillEntireHorizontalSpace ? $"{this.Class} d-flex flex-column flex-grow-1" : $"{this.Class} d-flex flex-column";
|
||||||
|
|
||||||
|
private string Styles => $"flex-grow: 1; overflow: hidden; {this.TerminatedStyles}{this.MinWidthStyle}";
|
||||||
|
|
||||||
public async Task ScrollToBottom()
|
public async Task ScrollToBottom()
|
||||||
{
|
{
|
||||||
await this.AnchorAfterChildContent.ScrollIntoViewAsync(this.JsRuntime);
|
await this.AnchorAfterChildContent.ScrollIntoViewAsync(this.JsRuntime);
|
||||||
|
Loading…
Reference in New Issue
Block a user