@namespace Connected.Components
@typeparam T
@inherits UIComponent
@implements IDisposable

<span  @onclick="ToggleSortDirection" class="@Classname" @attributes="@CustomAttributes">
    @if (!AppendIcon)
    {
        @ChildContent
    }
    @if (Enabled)
    {
        @if (_direction != SortDirection.None)
        {
            <Icon Icon="@SortIcon" Class="@GetSortIconClass()" />
        }
        else
        {
            <Icon Icon="@SortIcon" Class="table-sort-label-icon"/>
        }
    }
    @if (AppendIcon)
    {
        @ChildContent
    }
</span>
