mirror of
https://github.com/outline/outline.git
synced 2026-11-22 05:51:43 +03:00
* Working pass, needs refactor * revert * fix: Copy/paste behavior * fix: Public share rendering * fixes * fix: Click around emoji atom behavior * fix: Cannot position caret next to heading * Update app/scenes/Settings/components/EmojisTable.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
18 lines
464 B
TypeScript
18 lines
464 B
TypeScript
import useShare from "@shared/hooks/useShare";
|
|
|
|
type Props = React.ImgHTMLAttributes<HTMLImageElement> & {
|
|
value: string;
|
|
size?: number | string;
|
|
};
|
|
|
|
export const CustomEmoji = ({ value, size = 16, ...props }: Props) => {
|
|
const { shareId } = useShare();
|
|
return (
|
|
<img
|
|
src={`/api/emojis.redirect?id=${value}${shareId ? `&shareId=${shareId}` : ""}`}
|
|
style={{ width: size, height: size, objectFit: "contain" }}
|
|
{...props}
|
|
/>
|
|
);
|
|
};
|