Skip to content

Commit

Permalink
chore: nits
Browse files Browse the repository at this point in the history
  • Loading branch information
desmondinho committed Jun 7, 2024
1 parent 468634a commit 7297d2f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/LumexUI/Styles/Checkbox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,16 @@ private static ElementClass GetRadiusStyles( Radius radius )
.Add( _radiusLarge, when: radius is Radius.Large );
}

private static ElementClass GetSizeStyles( Size size, string part )
private static ElementClass GetSizeStyles( Size size, string slot )
{
if( part == "wrapper" )
if( slot == "wrapper" )
{
return ElementClass.Empty()
.Add( $"w-4 h-4 {_radiusSmall}", when: size is Size.Small )
.Add( $"w-5 h-5 {_radiusMedium}", when: size is Size.Medium )
.Add( $"w-6 h-6 {_radiusLarge}", when: size is Size.Large );
}
else if( part == "icon" )
else if( slot == "icon" )
{
return ElementClass.Empty()
.Add( "w-3 h-2", when: size is Size.Small )
Expand Down Expand Up @@ -156,7 +156,7 @@ public static string GetWrapperStyles( LumexCheckbox checkbox )
.Add( _wrapper )
.Add( GetColorStyles( checkbox.Color ) )
.Add( GetRadiusStyles( checkbox.Radius ) )
.Add( GetSizeStyles( checkbox.Size, part: "wrapper" ) )
.Add( GetSizeStyles( checkbox.Size, slot: "wrapper" ) )
.Add( checkbox.Classes?.Wrapper )
.ToString();
}
Expand All @@ -165,7 +165,7 @@ public static string GetIconStyles( LumexCheckbox checkbox )
{
return ElementClass.Empty()
.Add( _icon )
.Add( GetSizeStyles( checkbox.Size, part: "icon" ) )
.Add( GetSizeStyles( checkbox.Size, slot: "icon" ) )
.Add( checkbox.Classes?.Icon )
.ToString();
}
Expand All @@ -174,7 +174,7 @@ public static string GetLabelStyles( LumexCheckbox checkbox )
{
return ElementClass.Empty()
.Add( _label )
.Add( GetSizeStyles( checkbox.Size, part: "label" ) )
.Add( GetSizeStyles( checkbox.Size, slot: "label" ) )
.Add( checkbox.Classes?.Label )
.ToString();
}
Expand Down

0 comments on commit 7297d2f

Please sign in to comment.