+ {Object.keys(icons).map(name => {
+ // @ts-ignore
+ // eslint-disable-next-line import/namespace
+ const Icon = icons[name] as React.FunctionComponent
+
+ return (
+
+
+ {unpascal(name)}
+
+ )
+ })}
+
+ )
+ },
+}
+
+export default meta
From 39b6a5371f13b54e60354ff58839696880ee59cf Mon Sep 17 00:00:00 2001
From: Pavel Prichodko <14926950+prichodko@users.noreply.github.com>
Date: Wed, 18 Jan 2023 16:39:06 +0100
Subject: [PATCH 07/16] add ChatMessage component
---
.../src/chat-message/chat-message.stories.tsx | 50 +++++++++++
.../src/chat-message/chat-message.tsx | 87 +++++++++++++++++++
.../src/chat-message/components/actions.tsx | 15 ++++
.../src/chat-message/components/reactions.tsx | 31 +++++++
.../components/src/chat-message/index.tsx | 26 ++++++
5 files changed, 209 insertions(+)
create mode 100644 packages/components/src/chat-message/chat-message.stories.tsx
create mode 100644 packages/components/src/chat-message/chat-message.tsx
create mode 100644 packages/components/src/chat-message/components/actions.tsx
create mode 100644 packages/components/src/chat-message/components/reactions.tsx
create mode 100644 packages/components/src/chat-message/index.tsx
diff --git a/packages/components/src/chat-message/chat-message.stories.tsx b/packages/components/src/chat-message/chat-message.stories.tsx
new file mode 100644
index 00000000..d815f0ca
--- /dev/null
+++ b/packages/components/src/chat-message/chat-message.stories.tsx
@@ -0,0 +1,50 @@
+import { ChatMessage } from './chat-message'
+
+import type { Meta, StoryObj } from '@storybook/react'
+
+// More on how to set up stories at: https://storybook.js.org/docs/7.0/react/writing-stories/introduction
+const meta: Meta