From d428554d9477eab6f9ddc0eca6d0ab81aa11ef95 Mon Sep 17 00:00:00 2001 From: Pavel Prichodko <14926950+prichodko@users.noreply.github.com> Date: Wed, 6 Apr 2022 14:02:24 +0200 Subject: [PATCH] feat(react): pinned message state --- .../status-react/src/icons/unpin-icon.tsx | 29 +++++++++++++ .../src/routes/chat/chat-message.tsx | 42 +++++++++++++++---- 2 files changed, 64 insertions(+), 7 deletions(-) create mode 100644 packages/status-react/src/icons/unpin-icon.tsx diff --git a/packages/status-react/src/icons/unpin-icon.tsx b/packages/status-react/src/icons/unpin-icon.tsx new file mode 100644 index 00000000..32cc4414 --- /dev/null +++ b/packages/status-react/src/icons/unpin-icon.tsx @@ -0,0 +1,29 @@ +import React from 'react' + +export const UnpinIcon = (props: React.SVGProps) => { + return ( + + + + + + ) +} diff --git a/packages/status-react/src/routes/chat/chat-message.tsx b/packages/status-react/src/routes/chat/chat-message.tsx index 24b2f457..ce53f79c 100644 --- a/packages/status-react/src/routes/chat/chat-message.tsx +++ b/packages/status-react/src/routes/chat/chat-message.tsx @@ -22,6 +22,7 @@ interface Props { reply?: 'text' | 'image' | 'image-text' image?: boolean mention?: boolean + pinned?: boolean } const MessageLink = (props: React.AnchorHTMLAttributes) => { @@ -42,7 +43,7 @@ const MessageLink = (props: React.AnchorHTMLAttributes) => { } export const ChatMessage = (props: Props) => { - const { reply, image, mention } = props + const { reply, image, mention, pinned } = props const { dispatch } = useChatState() @@ -50,7 +51,7 @@ export const ChatMessage = (props: Props) => { <> {reply && } - +