@code {
[Parameter]
public bool Show { get; set; }
[Parameter]
public bool HideImage { get; set; }
[Parameter]
public string ImageUrl { get; set; } = "images/robot_painting.jpg";
public enum FlipDirection
{
Up,
Down,
Left,
Right
}
private string _flipperClassName;
private string _backClassName;
private FlipDirection _flipTo;
[Parameter]
public FlipDirection FlipTo
{
get => _flipTo;
set
{
_flipTo = value;
_flipperClassName = _flipTo switch
{
FlipDirection.Up => "flip-card_up",
FlipDirection.Down => "flip-card_down",
FlipDirection.Left => "flip-card_left",
FlipDirection.Right => "flip-card_right",
_ => throw new ArgumentOutOfRangeException()};
_backClassName = _flipTo switch
{
FlipDirection.Up => "flip-card-back_up",
FlipDirection.Down => "flip-card-back_down",
FlipDirection.Left => "flip-card-back_left",
FlipDirection.Right => "flip-card-back_right",
_ => throw new ArgumentOutOfRangeException()};
}
}
[Parameter]
public double FlipDelay { get; set; } = 0.0;
/// Gets or sets the click callback.
/// The click callback.
[Parameter]
public EventCallback Click { get; set; }
}