-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
985 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using Microsoft.AspNetCore.Components; | ||
|
||
namespace Shoelace.Style.Components; | ||
|
||
internal interface IClearable | ||
{ | ||
/// <summary> | ||
/// Adds a clear button when the input is not empty. | ||
/// </summary> | ||
public bool Clearable { get; set; } | ||
|
||
/// <summary> | ||
/// Emitted when the clear button is activated. | ||
/// </summary> | ||
public EventCallback OnClear { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@namespace Shoelace.Style.Components | ||
@inherits ShoelaceComponentBase | ||
|
||
<sl-icon @ref="Element" | ||
@attributes="AdditionalAttributes" | ||
class="@Class" | ||
id="@Id" | ||
style="@Style" | ||
label="@Label" | ||
library="@Library" | ||
name="@Name" | ||
src="@Src"></sl-icon> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
using Microsoft.AspNetCore.Components; | ||
|
||
namespace Shoelace.Style.Components; | ||
|
||
/// <summary> | ||
/// Icons are symbols that can be used to represent various options within an application. | ||
/// </summary> | ||
/// <remarks> | ||
/// <see href="https://shoelace.style/components/icon"/> | ||
/// </remarks> | ||
public partial class ShoelaceIcon : ShoelaceComponentBase | ||
{ | ||
#region Properties | ||
|
||
/// <summary> | ||
/// An alternate description to use for assistive devices. | ||
/// If omitted, the icon will be considered presentational and ignored by assistive devices. | ||
/// </summary> | ||
[Parameter] | ||
public string? Label { get; set; } | ||
|
||
/// <summary> | ||
/// The name of a registered custom icon library. | ||
/// </summary> | ||
[Parameter] | ||
public string? Library { get; set; } | ||
|
||
/// <summary> | ||
/// The name of the icon to draw. Available names depend on the icon library being used. | ||
/// </summary> | ||
[Parameter] | ||
[EditorRequired] | ||
public string Name { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// An external URL of an SVG file. Be sure you trust the content you are including, | ||
/// as it will be executed as code and can result in XSS attacks. | ||
/// </summary> | ||
[Parameter] | ||
public string? Src { get; set; } | ||
|
||
#endregion Properties | ||
|
||
#region Events | ||
|
||
/// <summary> | ||
/// Emitted when the icon has loaded. When using spriteSheet: true this will not emit. | ||
/// </summary> | ||
[Parameter] | ||
public EventCallback OnError { get; set; } | ||
|
||
/// <summary> | ||
/// Emitted when the icon fails to load due to an error. When using spriteSheet: true this will not emit. | ||
/// </summary> | ||
[Parameter] | ||
public EventCallback OnLoad { get; set; } | ||
|
||
#endregion Events | ||
} |
16 changes: 16 additions & 0 deletions
16
src/Shoelace.Style/Components/IconButton/ShoelaceIconButton.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@namespace Shoelace.Style.Components | ||
@inherits ShoelaceComponentBase | ||
|
||
<sl-icon-button @ref="Element" | ||
@attributes="AdditionalAttributes" | ||
class="@Class" | ||
id="@Id" | ||
style="@Style" | ||
disabled="@Disabled" | ||
download="@Download" | ||
href="@Href" | ||
label="@Label" | ||
library="@Library" | ||
name="@Name" | ||
src="@Src" | ||
target="@Target"></sl-icon-button> |
Oops, something went wrong.