Skip to content

Commit

Permalink
IconSize updates #346
Browse files Browse the repository at this point in the history
  • Loading branch information
gvreddy04 committed Sep 26, 2023
1 parent 30eb31e commit b5d84b9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
24 changes: 17 additions & 7 deletions blazorbootstrap/Enums/IconSize.cs
Original file line number Diff line number Diff line change
@@ -1,32 +1,42 @@
namespace BlazorBootstrap;

/// <summary>
/// Defines the size of an <see cref="Icon" /> element.
/// Represents the size of an <see cref="Icon" /> element.
/// </summary>
public enum IconSize
{
/// <summary>
/// Default icon size will be applied.
/// The default icon size.
/// </summary>
None,

/// <summary>
/// The icon will be size 2em.
/// An extra large icon, 2.5rem in size.
/// </summary>
x1,

/// <summary>
/// A large icon, 2rem in size.
/// </summary>
x2,

/// <summary>
/// The icon will be size 3em.
/// A medium icon, 1.75rem in size.
/// </summary>
x3,

/// <summary>
/// The icon will be size 4em.
/// A small icon, 1.5rem in size.
/// </summary>
x4,

/// <summary>
/// The icon will be size 5em.
/// A very small icon, 1.25rem in size.
/// </summary>
x5,

/// <summary>
/// The smallest icon, 1rem in size.
/// </summary>
x5
x6
}
2 changes: 2 additions & 0 deletions blazorbootstrap/Utilities/BootstrapIconProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ public string IconSize(IconSize iconSize)
{
return iconSize switch
{
BlazorBootstrap.IconSize.x1 => "fs-1",
BlazorBootstrap.IconSize.x2 => "fs-2",
BlazorBootstrap.IconSize.x3 => "fs-3",
BlazorBootstrap.IconSize.x4 => "fs-4",
BlazorBootstrap.IconSize.x5 => "fs-5",
BlazorBootstrap.IconSize.x6 => "fs-6",
_ => null
};
}
Expand Down

0 comments on commit b5d84b9

Please sign in to comment.