Skip to content

Commit

Permalink
📝
Browse files Browse the repository at this point in the history
  • Loading branch information
hlaueriksson committed Jul 10, 2024
1 parent 81d0052 commit 8913d23
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 41 deletions.
15 changes: 15 additions & 0 deletions GEmojiSharp.Blazor.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@ Update the `_Imports.razor` file, to enable the component in all Razor views:
@using GEmojiSharp.Blazor
```

> [!NOTE]
> In a Blazor Web App (.NET 8 or later), the component requires an interactive render mode applied either globally to the app or to the component definition.
Set the global render mode in `App.razor`:

```cshtml
<Routes @rendermode="InteractiveServer" />
```

or per page/component:

```cshtml
@rendermode InteractiveServer
```

Use the `<Emoji>` component to render emojis:

```html
Expand Down
43 changes: 2 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
[![GEmojiSharp.DotnetTool](https://img.shields.io/nuget/v/GEmojiSharp.DotnetTool.svg?label=GEmojiSharp.DotnetTool)](https://www.nuget.org/packages/GEmojiSharp.DotnetTool)

> GitHub Emoji for C# and .NET:
>
> - `netstandard2.0`
> - ASP.NET Core
> - Blazor
Expand Down Expand Up @@ -39,12 +40,11 @@
- [Usage](#usage-1)
- [Configuration](#configuration)
- [Samples](#samples)
- [Upgrading](#upgrading)
- [Attribution](#attribution)

## Introduction

[Using emoji](https://help.github.com/en/articles/basic-writing-and-formatting-syntax#using-emoji) on GitHub is accomplish with emoji aliases enclosed by colons:
[Using emojis](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#using-emojis) on GitHub is accomplish with emoji aliases enclosed by colons:

`:+1: This PR looks great - it's ready to merge! :shipit:`

Expand Down Expand Up @@ -705,45 +705,6 @@ The Blazor WebAssembly app is showcased here:

[![GEmojiSharp.Sample.BlazorWebAssembly](GEmojiSharp.Sample.BlazorWebAssembly.png)](https://hlaueriksson.github.io/GEmojiSharp/)

## Upgrading

> ⬆️ Upgrading from version `1.5.0` to `2.0.0`
Upgrade `GEmojiSharp.TagHelpers`:

- Uninstall `GEmojiSharp.TagHelpers`
- Install `GEmojiSharp.AspNetCore`
- Replace references to ~~`GEmojiSharp.TagHelpers`~~ with `GEmojiSharp.AspNetCore`:

```diff
- @addTagHelper *, GEmojiSharp.TagHelpers
+ @addTagHelper *, GEmojiSharp.AspNetCore
```

```diff
- @using GEmojiSharp.TagHelpers
+ @using GEmojiSharp.AspNetCore
```

```diff
- using GEmojiSharp.TagHelpers;
+ using GEmojiSharp.AspNetCore;
```

Upgrade `GEmojiSharp.Blazor`:

- Remove reference to the `css` file:

```diff
- <link href="_content/GEmojiSharp.Blazor/style.css" rel="stylesheet" />
```

- Remove reference to the `js` file:

```diff
- <script src="_content/GEmojiSharp.Blazor/script.js"></script>
```

## Attribution

Repositories consulted when building this:
Expand Down

0 comments on commit 8913d23

Please sign in to comment.