Skip to content

Instantly share code, notes, and snippets.

@skclusive
Created November 14, 2019 06:46
Show Gist options
  • Save skclusive/f6d2541247d944cf1469945e633810d7 to your computer and use it in GitHub Desktop.
Save skclusive/f6d2541247d944cf1469945e633810d7 to your computer and use it in GitHub Desktop.
@inherits TodoComponent
<section class="main">
@if (HasTodos)
{
<TodoToggleAll />
}
<ul class="todo-list">
@foreach (var todo in FilteredTodos)
{
<TodoItem @key="todo" Todo="@todo" />
}
</ul>
@if (HasTodos)
{
<TodoFooter />
}
</section>
@code {
protected bool HasTodos => TodoStore.TotalCount > 0;
protected IList<ITodo> FilteredTodos => TodoStore.FilteredTodos;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment