@using Radzen.Documents.Spreadsheet
@using System.Text
<div @attributes=@Attributes style=@Style></div>

@code {
#nullable enable
    [Parameter(CaptureUnmatchedValues = true)]
    public IDictionary<string, object>? Attributes { get; set; }

    [Parameter]
    public PixelRectangle Rect { get; set; }

    string Style => GetStyle();

    private string GetStyle()
    {
        var sb = StringBuilderCache.Acquire();
        Rect.AppendStyle(sb);
        return StringBuilderCache.GetStringAndRelease(sb);
    }
}