@liveblocks/react-ui
Version:
A set of React pre-built components for the Liveblocks products. Liveblocks is the all-in-one toolkit to build collaborative products like Figma, Notion, and more.
31 lines (28 loc) • 787 B
JavaScript
import { jsx } from 'react/jsx-runtime';
import { Slot } from '@radix-ui/react-slot';
import { forwardRef } from 'react';
import { EMOJI_FONT_FAMILY } from '../../constants.js';
const Emoji = forwardRef(
({ emoji, style, asChild, ...props }, forwardedRef) => {
const Component = asChild ? Slot : "span";
return /* @__PURE__ */ jsx(Component, {
role: "img",
"aria-label": emoji,
"data-emoji": emoji,
style: {
...style,
fontFamily: EMOJI_FONT_FAMILY,
display: "inline-flex",
alignItems: "center",
justifyContent: "center",
width: "1em",
whiteSpace: "nowrap"
},
...props,
ref: forwardedRef,
children: emoji
});
}
);
export { Emoji };
//# sourceMappingURL=Emoji.js.map