-
-
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
1 parent
53ebfba
commit d77af37
Showing
14 changed files
with
185 additions
and
175 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
@inherits SettingsCardBase | ||
|
||
<div class="@ClassValue" style="@Style"> | ||
<FluentCard | ||
onclick="@OnClick" | ||
AreaRestricted="false" | ||
Style="padding: var(--settings-button-padding);"> | ||
<div class="content-grid"> | ||
<SettingsPresenter | ||
Icon="@Icon" | ||
Header="@Header" | ||
Description="@Description" | ||
ActionContent="@ActionContent" /> | ||
@if (ActionIcon != null) | ||
{ | ||
<div class="action-icon-holder"> | ||
@ActionIcon | ||
</div> | ||
} | ||
</div> | ||
</FluentCard> | ||
</div> |
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,31 @@ | ||
using Microsoft.AspNetCore.Components; | ||
using Microsoft.AspNetCore.Components.Web; | ||
using Microsoft.FluentUI.AspNetCore.Components.Utilities; | ||
|
||
namespace Wherlog.Controls | ||
{ | ||
public partial class SettingsButton : SettingsCardBase | ||
{ | ||
protected override string ClassValue => new CssBuilder(Class) | ||
.AddClass("settings-button") | ||
.Build(); | ||
|
||
/// <summary> | ||
/// Gets or sets the icon that is shown when IsClickEnabled is set to true. | ||
/// </summary> | ||
[Parameter] | ||
public RenderFragment ActionIcon { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the tooltip of the ActionIcon. | ||
/// </summary> | ||
[Parameter] | ||
public string ActionIconToolTip { get; set; } = "More"; | ||
|
||
/// <summary> | ||
/// Command executed when the user clicks on the button. | ||
/// </summary> | ||
[Parameter] | ||
public EventCallback<MouseEventArgs> OnClick { 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,18 @@ | ||
* { | ||
--settings-button-padding: 16px 0 16px 16px; | ||
} | ||
|
||
::deep div.content-grid { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
} | ||
|
||
::deep div.action-icon-holder { | ||
width: 32px; | ||
height: auto; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
margin: 0 8px; | ||
} |
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 |
---|---|---|
@@ -1,13 +1,19 @@ | ||
@inherits FluentComponentBase | ||
@using Microsoft.FluentUI.AspNetCore.Components.Utilities | ||
@inherits SettingsCardBase | ||
|
||
<div class="@ClassValue" style="@Style"> | ||
<FluentCard AreaRestricted="false" Style="padding: var(--settings-card-padding);"> | ||
<SettingsPresenter | ||
Icon="@Icon" | ||
Header="@Header" | ||
Description="@Description" | ||
ActionContent="@ActionContent" | ||
ActionIcon="@ActionIcon" | ||
ActionIconToolTip="@ActionIconToolTip"/> | ||
ActionContent="@ActionContent"/> | ||
</FluentCard> | ||
</div> | ||
|
||
@code | ||
{ | ||
protected override string ClassValue => new CssBuilder(Class) | ||
.AddClass("settings-card") | ||
.Build(); | ||
} |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.