Skip to content

Commit

Permalink
🐛 fix(Icon): should not enable transition mode by default (#2029)
Browse files Browse the repository at this point in the history
  • Loading branch information
capdiem authored Jul 10, 2024
1 parent 042d1cd commit 903b5aa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Masa.Blazor/Components/Icon/MIcon.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public bool IsDark

private string? _iconCss;
private bool _transitionValue;
private ConditionType _transitionConditionType = ConditionType.Show;
private ConditionType _transitionConditionType = ConditionType.None;

public bool Medium => false;

Expand Down Expand Up @@ -255,11 +255,16 @@ protected override void OnParametersSet()
_transitionValue = If;
_transitionConditionType = ConditionType.If;
}
else
else if(IsDirtyParameter(nameof(TransitionShow)))
{
_transitionValue = TransitionShow;
_transitionConditionType = ConditionType.Show;
}
else
{
_transitionValue = true;
_transitionConditionType = ConditionType.None;
}
}

protected override async Task OnAfterRenderAsync(bool firstRender)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

public enum ConditionType
{
None,
If,
Show
}

0 comments on commit 903b5aa

Please sign in to comment.