Added Table Component

This commit is contained in:
2026-04-14 15:44:47 +05:00
parent 398d22169d
commit b7c75716e8
4 changed files with 43 additions and 23 deletions
@@ -1,4 +1,5 @@
@page "/weather"
@using Enciphered.Blazor.UIComponents
@attribute [StreamRendering]
<PageTitle>Weather</PageTitle>
@@ -13,27 +14,20 @@
}
else
{
<table class="table">
<thead>
<tr>
<th>Date</th>
<th aria-label="Temperature in Celsius">Temp. (C)</th>
<th aria-label="Temperature in Farenheit">Temp. (F)</th>
<th>Summary</th>
</tr>
</thead>
<tbody>
@foreach (var forecast in forecasts)
{
<tr>
<td>@forecast.Date.ToShortDateString()</td>
<td>@forecast.TemperatureC</td>
<td>@forecast.TemperatureF</td>
<td>@forecast.Summary</td>
</tr>
}
</tbody>
</table>
<Table Items="forecasts">
<Columns>
<th>Date</th>
<th aria-label="Temperature in Celsius">Temp. (C)</th>
<th aria-label="Temperature in Farenheit">Temp. (F)</th>
<th>Summary</th>
</Columns>
<RowTemplate Context="forecast">
<td>@forecast.Date.ToShortDateString()</td>
<td>@forecast.TemperatureC</td>
<td>@forecast.TemperatureF</td>
<td>@forecast.Summary</td>
</RowTemplate>
</Table>
}
@code {
File diff suppressed because one or more lines are too long