private RenderFragment NotBorderedContent(DescriptionsItem item) { RenderFragment notBorderedContent = b => { b.OpenElement(1, "span"); b.AddAttribute(2, "class", $"{prefix}-item-content"); b.AddContent(3, item.Content); b.CloseElement(); }; return(notBorderedContent); }
private RenderFragment NotBorderedLabel(DescriptionsItem item) { RenderFragment notBorderedLabel = b => { b.OpenElement(1, "span"); b.AddAttribute(2, "class", $"{prefix}-item-label"); if (!Colon) { b.AddAttribute(3, "class", $"{prefix}-item-no-colon"); } b.AddContent(4, item.Label); b.CloseElement(); }; return(notBorderedLabel); }
private RenderFragment BorderedContent(DescriptionsItem item) { RenderFragment borderedContent = b => { b.OpenElement(1, "td"); b.AddAttribute(2, "class", $"{prefix}-item-content"); if (Direction == DescriptionsDirection.Horizontal) { b.AddAttribute(3, "colspan", item.Span * 2 - 1); } else { b.AddAttribute(3, "colspan", item.Span); } b.AddContent(4, item.Content); b.CloseElement(); }; return(borderedContent); }
public void AddChildItem(DescriptionsItem item) { _children.Add(item); StateHasChanged(); }