<div class="ctooltip-wrapper" @onclick="() => ShowTooltip = OnHover ? ShowTooltip : !OnHover" @onmouseover="() => ShowTooltip = OnHover" @onmouseout="() => ShowTooltip = false">
    <div class="ctooltip rounded @(ShowTooltip ? "show" : "")">
        @Text
    </div>
    @ChildContent
</div>

@code {
    [Parameter]
    public RenderFragment ChildContent { get; set; }
    [Parameter]
    public string Text { get; set; }
    [Parameter]
    public bool OnHover { get; set; } = false;

    private bool ShowTooltip { get; set; }
}