2019-10-14 00:32:11 +03:00
|
|
|
/*
|
2024-09-09 14:57:16 +01:00
|
|
|
Copyright 2024 New Vector Ltd.
|
2020-09-28 15:47:03 +01:00
|
|
|
Copyright 2020 The Matrix.org Foundation C.I.C.
|
2024-09-09 14:57:16 +01:00
|
|
|
Copyright 2019 Tulir Asokan <tulir@maunium.net>
|
2019-10-14 00:32:11 +03:00
|
|
|
|
2024-09-09 14:57:16 +01:00
|
|
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
|
|
|
|
Please see LICENSE files in the repository root for full details.
|
2019-10-14 00:32:11 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import React from "react";
|
2023-08-21 20:06:40 +01:00
|
|
|
import { Emoji } from "@matrix-org/emojibase-bindings";
|
2019-10-14 00:32:11 +03:00
|
|
|
|
2020-09-28 15:47:03 +01:00
|
|
|
interface IProps {
|
2023-08-21 20:06:40 +01:00
|
|
|
emoji: Emoji;
|
2020-09-28 15:47:03 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class Preview extends React.PureComponent<IProps> {
|
2023-02-13 17:01:43 +00:00
|
|
|
public render(): React.ReactNode {
|
2022-03-23 18:08:34 +01:00
|
|
|
const {
|
|
|
|
|
unicode,
|
|
|
|
|
label,
|
|
|
|
|
shortcodes: [shortcode],
|
|
|
|
|
} = this.props.emoji;
|
2020-09-28 15:47:03 +01:00
|
|
|
|
2019-10-14 00:32:11 +03:00
|
|
|
return (
|
|
|
|
|
<div className="mx_EmojiPicker_footer mx_EmojiPicker_preview">
|
|
|
|
|
<div className="mx_EmojiPicker_preview_emoji">{unicode}</div>
|
|
|
|
|
<div className="mx_EmojiPicker_preview_text">
|
|
|
|
|
<div className="mx_EmojiPicker_name mx_EmojiPicker_preview_name">{label}</div>
|
|
|
|
|
<div className="mx_EmojiPicker_shortcode">{shortcode}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2019-10-22 13:49:02 +01:00
|
|
|
);
|
2019-10-14 00:32:11 +03:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default Preview;
|