diff --git a/src/Connected.Components/Components/Button.razor b/src/Connected.Components/Components/Button.razor index fe19baf..1465f49 100644 --- a/src/Connected.Components/Components/Button.razor +++ b/src/Connected.Components/Components/Button.razor @@ -1,44 +1,9 @@  diff --git a/src/Connected.Components/Components/Button.razor.cs b/src/Connected.Components/Components/Button.razor.cs index 6197fd3..c25d239 100644 --- a/src/Connected.Components/Components/Button.razor.cs +++ b/src/Connected.Components/Components/Button.razor.cs @@ -26,10 +26,10 @@ public partial class Button /// /// Size of the button. /// Options: Size.[Small,Medium,Large,FullWidth] - /// Default: Size.Large + /// Default: Size.Medium /// [Parameter] - public Size Size { get; set; } = Size.Large; + public Size Size { get; set; } = Size.Medium; /// /// Text shown inside the button @@ -46,29 +46,6 @@ public partial class Button [Parameter] public bool Disabled { get; set; } = false; - /// - /// Glyph (Icon) inside the button. - /// Options: SVG string --> Icons - /// Default: string.Empty - /// - [Parameter] - public string Glyph { get; set; } = string.Empty; - - /// - /// Position of the glyph relative to button Text parameter. If Glyph parameter == string.Empty this parameter is ignored - /// Options: Position.[left,top,right,bottom] - /// Default: Position.left - /// - [Parameter] - public Position GlyphPosition { get; set; } = Position.Left; - - /// - /// Color for the glyph. If Glyph parameter is empty this parameter is ignored - /// Options: Color.[Core,Primary,Secondary,Success,Info,Warning,Danger,White,Light,Dark] - /// Default: Color.Dark - /// - [Parameter] - public Color GlyphColor { get; set; } = Color.Dark; /// /// User defined custom class added on top of default generated classes @@ -113,7 +90,7 @@ public partial class Button #region Styling - private string StyleList + public string StyleList { get { @@ -127,7 +104,7 @@ public partial class Button /// /// Generated class list for button based on user parameters /// - private string ClassList + public string ClassList { get { @@ -143,7 +120,7 @@ public partial class Button /// /// Generated class list for button based on user parameters /// - private string ContentClassList + public string ContentClassList { get { diff --git a/src/Connected.Components/Components/GlyphButton.razor b/src/Connected.Components/Components/GlyphButton.razor new file mode 100644 index 0000000..eff05e6 --- /dev/null +++ b/src/Connected.Components/Components/GlyphButton.razor @@ -0,0 +1,46 @@ +@inherits Button + + diff --git a/src/Connected.Components/Components/GlyphButton.razor.cs b/src/Connected.Components/Components/GlyphButton.razor.cs new file mode 100644 index 0000000..7aca7a1 --- /dev/null +++ b/src/Connected.Components/Components/GlyphButton.razor.cs @@ -0,0 +1,34 @@ +using Microsoft.AspNetCore.Components; + +namespace Connected.Components; +public partial class GlyphButton : Button +{ + #region Parameters + + /// + /// Glyph (Icon) inside the button. + /// Options: SVG string --> Icons + /// Default: string.Empty + /// + [Parameter, EditorRequired] + public string Glyph { get; set; } = string.Empty; + + /// + /// Position of the glyph relative to button Text parameter. If Glyph parameter == string.Empty this parameter is ignored + /// Options: Position.[left,top,right,bottom] + /// Default: Position.left + /// + [Parameter] + public Position GlyphPosition { get; set; } = Position.Left; + + /// + /// Color for the glyph. If Glyph parameter is empty this parameter is ignored + /// Options: Color.[Core,Primary,Secondary,Success,Info,Warning,Danger,White,Light,Dark] + /// Default: Color.Dark + /// + [Parameter] + public Color GlyphColor { get; set; } = Color.Dark; + + #endregion + +}