features/rewrite/grid #13
@ -22,4 +22,9 @@
 | 
				
			|||||||
		<Watch Remove="..\..\src\**\bin\**" />
 | 
							<Watch Remove="..\..\src\**\bin\**" />
 | 
				
			||||||
	</ItemGroup>
 | 
						</ItemGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<ItemGroup>
 | 
				
			||||||
 | 
						  <Watch Remove="Program.cs" />
 | 
				
			||||||
 | 
						</ItemGroup>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</Project>
 | 
					</Project>
 | 
				
			||||||
 | 
				
			|||||||
@ -4,9 +4,20 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
<h1 style="text-align:center;">Component Sandbox</h1>
 | 
					<h1 style="text-align:center;">Component Sandbox</h1>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<DatePicker @bind-SelectedDate=date>
 | 
					<Grid>
 | 
				
			||||||
 | 
					    @for (int i = 0; i < 5; i++)
 | 
				
			||||||
</DatePicker>
 | 
					    {
 | 
				
			||||||
 | 
					        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>
 | 
					<p>Izbran datum je: @date</p>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -46,7 +46,7 @@ public partial class FormWizardStep
 | 
				
			|||||||
		get
 | 
							get
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			return new CssBuilder("dot")
 | 
								return new CssBuilder("dot")
 | 
				
			||||||
				.AddClass("completed",Completed)
 | 
									.AddClass("completed", Completed)
 | 
				
			||||||
				.AddClass("next", Active)
 | 
									.AddClass("next", Active)
 | 
				
			||||||
				.Build();
 | 
									.Build();
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
@ -62,7 +62,7 @@ public partial class FormWizardStep
 | 
				
			|||||||
		get
 | 
							get
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			return new StyleBuilder()
 | 
								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)
 | 
									.AddStyle(Style)
 | 
				
			||||||
				.Build();
 | 
									.Build();
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
				
			|||||||
@ -26,15 +26,22 @@ public partial class GridRowContent : ComponentBase
 | 
				
			|||||||
	{
 | 
						{
 | 
				
			||||||
		get
 | 
							get
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			return new CssBuilder("row")
 | 
								CssBuilder cssBuilder = new CssBuilder("row");
 | 
				
			||||||
				.AddClass("collapsed", Collapsable)
 | 
					
 | 
				
			||||||
				.AddClass("show", (Collapsable ? Parent?.CollapsedItemShown : false))
 | 
								cssBuilder.AddClass("collapsed", Collapsable);
 | 
				
			||||||
				.Build();
 | 
					
 | 
				
			||||||
 | 
								if (Parent is not null)
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									cssBuilder.AddClass("show", (Collapsable ? Parent.CollapsedItemShown : false));
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								return cssBuilder.Build();
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	protected override async Task OnInitializedAsync()
 | 
						protected override async Task OnInitializedAsync()
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (Parent is not null)
 | 
							if (Parent is not null)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			if (Parent.Children is null) Parent.Children = new();
 | 
								if (Parent.Children is null) Parent.Children = new();
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										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