GridRowContent - fixed Collapsable
This commit is contained in:
parent
402e904b10
commit
f770bd26bc
@ -22,4 +22,9 @@
|
||||
<Watch Remove="..\..\src\**\bin\**" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<Watch Remove="Program.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -4,9 +4,20 @@
|
||||
|
||||
<h1 style="text-align:center;">Component Sandbox</h1>
|
||||
|
||||
<DatePicker @bind-SelectedDate=date>
|
||||
|
||||
</DatePicker>
|
||||
<Grid>
|
||||
@for (int i = 0; i < 5; i++)
|
||||
{
|
||||
int num = i;
|
||||
<GridRow>
|
||||
<GridRowContent>
|
||||
Fixed content @num.ToString()
|
||||
</GridRowContent>
|
||||
<GridRowContent Collapsable=true>
|
||||
Collapsable content @num.ToString()
|
||||
</GridRowContent>
|
||||
</GridRow>
|
||||
}
|
||||
</Grid>
|
||||
|
||||
<p>Izbran datum je: @date</p>
|
||||
|
||||
|
@ -46,7 +46,7 @@ public partial class FormWizardStep
|
||||
get
|
||||
{
|
||||
return new CssBuilder("dot")
|
||||
.AddClass("completed",Completed)
|
||||
.AddClass("completed", Completed)
|
||||
.AddClass("next", Active)
|
||||
.Build();
|
||||
}
|
||||
@ -62,7 +62,7 @@ public partial class FormWizardStep
|
||||
get
|
||||
{
|
||||
return new StyleBuilder()
|
||||
.AddStyle("display","none", (!Active && !IsNext && !IsPrevious)) //Workarround for more than 2 steps where steps didnt hide after
|
||||
.AddStyle("display", "none", (!Active && !IsNext && !IsPrevious)) //Workarround for more than 2 steps where steps didnt hide after
|
||||
.AddStyle(Style)
|
||||
.Build();
|
||||
}
|
||||
|
@ -26,15 +26,22 @@ public partial class GridRowContent : ComponentBase
|
||||
{
|
||||
get
|
||||
{
|
||||
return new CssBuilder("row")
|
||||
.AddClass("collapsed", Collapsable)
|
||||
.AddClass("show", (Collapsable ? Parent?.CollapsedItemShown : false))
|
||||
.Build();
|
||||
CssBuilder cssBuilder = new CssBuilder("row");
|
||||
|
||||
cssBuilder.AddClass("collapsed", Collapsable);
|
||||
|
||||
if (Parent is not null)
|
||||
{
|
||||
cssBuilder.AddClass("show", (Collapsable ? Parent.CollapsedItemShown : false));
|
||||
}
|
||||
|
||||
return cssBuilder.Build();
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
|
||||
if (Parent is not null)
|
||||
{
|
||||
if (Parent.Children is null) Parent.Children = new();
|
||||
|
@ -5,7 +5,7 @@ namespace Connected;
|
||||
public enum Color
|
||||
{
|
||||
[Description("core")]
|
||||
Core,
|
||||
Core,
|
||||
|
||||
[Description("primary")]
|
||||
Primary,
|
||||
|
23
src/Connected.Components/Enums/ThemeProvider.cs
Normal file
23
src/Connected.Components/Enums/ThemeProvider.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Connected;
|
||||
|
||||
public enum Theme
|
||||
{
|
||||
[Description("")]
|
||||
Default,
|
||||
|
||||
[Description("dark")]
|
||||
Dark,
|
||||
|
||||
[Description("light")]
|
||||
Light,
|
||||
|
||||
[Description("pink")]
|
||||
Pink
|
||||
}
|
||||
|
||||
public static class ThemeProvider
|
||||
{
|
||||
public static Theme theme { get; set; } = Theme.Default;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user