Skip to content

Commit

Permalink
♻ refactor(SimpleCheckbox): use ripple custom attribute instead of ri…
Browse files Browse the repository at this point in the history
…pple element
  • Loading branch information
capdiem committed Aug 9, 2024
1 parent 8ffc818 commit b379835
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/Masa.Blazor/Components/Checkbox/MSimpleCheckbox.razor
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,13 @@
style="@GetStyle()"
@onclick="@HandleOnClickAsync"
@onclick:stopPropagation>
<div class="@_selectionBlock.Element("input")">
<div class="@_selectionBlock.Element("input")" ripple="@(Ripple && !Disabled)">
<MIcon Color="@(Value ? Color : null)"
Disabled="@Disabled"
Dark="@Dark"
Light="@Light">
@ComputedIcon
</MIcon>

@if (Ripple && !Disabled)
{
<div class="@GetClass(_selectionBlock.Element("ripple").Name, CssClassUtils.GetColor(Color, true))"
style="@(StyleBuilder.Create().AddTextColor(Color))">
</div>
}
</div>
</div>
</CascadingValue>

0 comments on commit b379835

Please sign in to comment.