feat: use animated emojis from fluent
This commit is contained in:
14
components/Emoji.tsx
Normal file
14
components/Emoji.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { asset } from "$fresh/runtime.ts";
|
||||
|
||||
export const Emoji = (props: { class?: string; name: string }) => {
|
||||
return props.name
|
||||
? props.name.endsWith(".png")
|
||||
? (
|
||||
<img
|
||||
class={`${props?.class || ""}`}
|
||||
src={asset(`/emojis/${props.name}`)}
|
||||
/>
|
||||
)
|
||||
: <span>{props.name}</span>
|
||||
: <></>;
|
||||
};
|
||||
Reference in New Issue
Block a user