Files
ThreadNet-Web/src/components/views/emojipicker/Preview.tsx
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
1.1 KiB
TypeScript
Raw Normal View History

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
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
2024-09-09 14:57:16 +01:00
Please see LICENSE files in the repository root for full details.
2019-10-14 00:32:11 +03:00
*/
import React from "react";
2025-02-05 13:25:06 +00:00
import { type Emoji } from "@matrix-org/emojibase-bindings";
2019-10-14 00:32:11 +03:00
2020-09-28 15:47:03 +01:00
interface IProps {
emoji: Emoji;
2020-09-28 15:47:03 +01:00
}
class Preview extends React.PureComponent<IProps> {
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;