<button type="button" class="btn @CustomStyleClass" data-bs-toggle="modal" data-bs-target="@DialogId" @onclick="OnclickFunc">
  @ButtonName
</button>

@code
{
  [Parameter]
  public EventCallback OnclickFunc { get; set; }

  [Parameter]
  public string ButtonName { get; set; }

  [Parameter]
  public string CustomStyleClass { get; set; } = "btn-primary";

  [Parameter]
  public string DialogId { get; set; } = "#exampleModal";

  protected override void OnInitialized()
  {
    if (DialogId[0] != '#')
      DialogId = $"#{DialogId}";
    base.OnInitialized();
  }
}
