Demos/AnimationShowcase/Components/CtrlButton.cs
using System;
using Goo;
using Sandbox.UI;
using static Sandbox.DemoTokens;

namespace Sandbox.AnimationShowcase;

public static class CtrlButton
{
    public static Container Build( string label, Action<MousePanelEvent> onClick ) => new Container
    {
        Padding              = Space3,
        BackgroundColor      = BgCard,
        HoverBackgroundColor = BgCardHi,
        BorderRadius         = Radius2,
        PointerEvents        = PointerEvents.All,
        OnClick              = onClick,
        Children =
        {
            new Text( label ) { FontColor = FgPrimary, FontSize = FontBodySm },
        },
    };
}