@fibery/ui-kit 1.17.0 → 1.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -74,7 +74,7 @@ const CategoryItem: React.FC<CategoryItemProps> = ({id, renderEmoji}) => {
|
|
|
74
74
|
const emojiPickerCtx = useEmojiPickerCtx();
|
|
75
75
|
const emojiContentSettings = useEmojiPickerContentSettings();
|
|
76
76
|
|
|
77
|
-
const emoji = useEmojiDataStoreSelector((store) => store.get(id));
|
|
77
|
+
const emoji = useEmojiDataStoreSelector((store) => store.get(id, {skin}));
|
|
78
78
|
|
|
79
79
|
if (!emoji) {
|
|
80
80
|
return null;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import {FC} from "react";
|
|
1
2
|
import {EmojiItem, EmojiSkin} from "@fibery/emoji-data";
|
|
2
3
|
import {css, cx} from "@linaria/core";
|
|
3
4
|
import {themeVars} from "../../designSystem";
|
|
@@ -41,12 +42,14 @@ export type EmojiProps = {
|
|
|
41
42
|
skin?: EmojiSkin;
|
|
42
43
|
/** render emoji as native unicode if possible */
|
|
43
44
|
native?: boolean;
|
|
45
|
+
fallback?: "shortcode" | "hidden";
|
|
44
46
|
};
|
|
45
|
-
|
|
47
|
+
|
|
48
|
+
export const Emoji: FC<EmojiProps> = ({emoji: idOrColons, size, version = 14, fallback = "hidden", skin, native}) => {
|
|
46
49
|
const emoji = useEmojiDataStoreSelector((store) => store.get(idOrColons, {skin}));
|
|
47
50
|
|
|
48
51
|
if (!emoji) {
|
|
49
|
-
return null;
|
|
52
|
+
return fallback === "shortcode" ? <>{idOrColons}</> : null;
|
|
50
53
|
}
|
|
51
54
|
|
|
52
55
|
let emojiNode: React.ReactNode;
|