@Text @if (AdditionalText.Length > 0) { @AdditionalText }
@code {
///
/// Gets or sets the URL that the hyperlink points to.
///
[Parameter]
public string Href { get; set; } = string.Empty;
///
/// Gets or sets the main text of the button.
///
[Parameter]
public string Text { get; set; } = string.Empty;
///
/// Gets or sets the additional text that appears on larger screens.
///
[Parameter]
public string AdditionalText { get; set; } = string.Empty;
///
/// Gets or sets the color theme of the button.
///
[Parameter]
public string Color { get; set; } = "primary";
///
/// Gets or sets additional CSS classes to apply to the button.
///
[Parameter]
public string AdditionalClasses { get; set; } = string.Empty;
///
/// Gets the CSS classes for the link button based on the color and additional classes.
///
/// A string containing the CSS classes for the link button.
private string GetButtonClasses()
{
var colorClasses = ButtonStyles.GetColorClasses(Color);
return $"{ButtonStyles.BaseClasses} {colorClasses} {AdditionalClasses}".Trim();
}
}