From 49e1b35ffe12dc5d95a92e1bdb3502d9acd0c487 Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Fri, 16 Feb 2024 19:44:03 -0800 Subject: lume: promote Chat components Signed-off-by: Xe Iaso --- lume/_config.ts | 4 ++++ lume/src/_components/ChatBubble.jsx | 21 +++++++++++++++++++++ lume/src/_components/ChatFrame.jsx | 7 +++++++ lume/src/_components/LoadingSpinner.jsx | 12 ++++++++++++ 4 files changed, 44 insertions(+) create mode 100644 lume/src/_components/ChatBubble.jsx create mode 100644 lume/src/_components/ChatFrame.jsx create mode 100644 lume/src/_components/LoadingSpinner.jsx diff --git a/lume/_config.ts b/lume/_config.ts index 4282bcb..5f3c866 100644 --- a/lume/_config.ts +++ b/lume/_config.ts @@ -17,6 +17,8 @@ import readInfo from "lume/plugins/reading_info.ts"; import tailwindOptions from "./tailwind.config.js"; import BlockQuote from "./src/_components/BlockQuote.jsx"; +import ChatFrame from "./src/_components/ChatFrame.jsx"; +import ChatBubble from "./src/_components/ChatBubble.jsx"; import Figure from "./src/_components/Figure.tsx"; import XeblogConv from "./src/_components/XeblogConv.tsx"; import XeblogHero from "./src/_components/XeblogHero.tsx"; @@ -69,6 +71,8 @@ site.use(feed({ site.use(mdx({ components: { "BlockQuote": BlockQuote, + "ChatFrame": ChatFrame, + "ChatBubble": ChatBubble, "Figure": Figure, "Image": Figure, "XeblogConv": XeblogConv, diff --git a/lume/src/_components/ChatBubble.jsx b/lume/src/_components/ChatBubble.jsx new file mode 100644 index 0000000..c10fefb --- /dev/null +++ b/lume/src/_components/ChatBubble.jsx @@ -0,0 +1,21 @@ +export default function ChatBubble({ + reply = false, + bg = "blue-dark", + fg = "slate-50", + children, +}) { + return ( +
+
+
+
+ {children} +
+
+
+
+ ); +} \ No newline at end of file diff --git a/lume/src/_components/ChatFrame.jsx b/lume/src/_components/ChatFrame.jsx new file mode 100644 index 0000000..1761bb4 --- /dev/null +++ b/lume/src/_components/ChatFrame.jsx @@ -0,0 +1,7 @@ +export default function ChatFrame({ children }) { + return ( + <> +
{children}
+ + ); +} \ No newline at end of file diff --git a/lume/src/_components/LoadingSpinner.jsx b/lume/src/_components/LoadingSpinner.jsx new file mode 100644 index 0000000..826af16 --- /dev/null +++ b/lume/src/_components/LoadingSpinner.jsx @@ -0,0 +1,12 @@ +export default function LoadingSpinner() { + return ( +
+ + Loading... + +
+ ); +} \ No newline at end of file -- cgit v1.2.3