Code/Demos/AnimationShowcase/Components/FillCell.cs
using Goo;
using Sandbox.UI;
using static Sandbox.DemoTokens;

namespace Sandbox.AnimationShowcase;

public static class FillCell
{
    const float CellW = 160f;
    const float BarW  = CellW - 32f;
    const float BarH  = 16f;

    public static Container Build( string label, float t, Color color ) => new Container
    {
        Width         = CellW,
        FlexDirection = FlexDirection.Column,
        Gap           = Space2,
        Children =
        {
            new Text( label ) { FontColor = color, FontSize = FontCaption },
            ProgressBar.Build( BarW, BarH, t, color ),
        },
    };
}