-
-
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
684b4cf
commit fe64d29
Showing
9 changed files
with
189 additions
and
15 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
23 changes: 23 additions & 0 deletions
23
src/BlazingApple.Components/BlazingApple.Components/Calendar/CalendarIcon.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,23 @@ | ||
|
||
<div class="ba-calendar-icon-container @SizeClass" @attributes="@AdditionalAttributes"> | ||
<div class="ba-calendar-icon-top"> | ||
@if(Date.Date == DateTime.Now.Date) | ||
{ | ||
@Date.ToString("t") | ||
} | ||
else | ||
{ | ||
@Date.Day | ||
} | ||
</div> | ||
<div class="ba-calendar-icon-bottom"> | ||
@if (Date.Date == DateTime.Now.Date) | ||
{ | ||
<span>Today</span> | ||
} | ||
else | ||
{ | ||
@Date.ToString("MMM") | ||
} | ||
</div> | ||
</div> |
17 changes: 17 additions & 0 deletions
17
src/BlazingApple.Components/BlazingApple.Components/Calendar/CalendarIcon.razor.cs
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,17 @@ | ||
namespace BlazingApple.Components.Calendar; | ||
|
||
/// <summary>Renders a calendar showing a particular day.</summary> | ||
public partial class CalendarIcon : ComponentBase | ||
{ | ||
/// <summary>Additional styles to apply to the badge.</summary> | ||
[Parameter(CaptureUnmatchedValues = true)] | ||
public IDictionary<string, object>? AdditionalAttributes { get; set; } | ||
|
||
/// <summary>The date/time to render</summary> | ||
[Parameter, EditorRequired] | ||
public DateTime Date { get; set; } | ||
|
||
/// <summary>"small", "medium", or "large" to change the size of the calendar, or use your own css class.</summary> | ||
[Parameter] | ||
public string SizeClass { get; set; } = "small"; | ||
} |
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
2 changes: 1 addition & 1 deletion
2
...lazingApple.Components/BlazingApple.Components/wwwroot/css/blazingAppleComponents.min.css
Large diffs are not rendered by default.
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