[frontend/components] Make InlineEmoji generic
This commit is contained in:
parent
7e6fba61da
commit
8cb9f272e3
2 changed files with 6 additions and 5 deletions
|
@ -1,14 +1,15 @@
|
||||||
@using Iceshrimp.Shared.Schemas.Web
|
@using Iceshrimp.Shared.Schemas.Web
|
||||||
|
|
||||||
@if (Reaction.Url == null)
|
@if (Url == null)
|
||||||
{
|
{
|
||||||
<span class="unicode-reaction">@Reaction.Name</span>
|
<span class="unicode-reaction">@Name</span>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<img class="custom-reaction" src="@Reaction.Url" alt="@Reaction.Name"/>
|
<img class="custom-reaction" src="@Url" alt="@Name"/>
|
||||||
}
|
}
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
[Parameter, EditorRequired] public required NoteReactionSchema Reaction { get; set; }
|
[Parameter, EditorRequired] public required string Name { get; set; }
|
||||||
|
[Parameter, EditorRequired] public required string? Url { get; set; }
|
||||||
}
|
}
|
|
@ -6,7 +6,7 @@
|
||||||
{
|
{
|
||||||
<TabPage>
|
<TabPage>
|
||||||
<Title>
|
<Title>
|
||||||
<InlineEmoji Reaction="el"/>
|
<InlineEmoji Name="@el.Name" Url="@el.Url"/>
|
||||||
<span class="reaction-count">@el.Count</span>
|
<span class="reaction-count">@el.Count</span>
|
||||||
</Title>
|
</Title>
|
||||||
<TabContent>
|
<TabContent>
|
||||||
|
|
Loading…
Add table
Reference in a new issue