changed to new functions
All checks were successful
Deploy Docs to Synology / deploy (push) Successful in 3s
All checks were successful
Deploy Docs to Synology / deploy (push) Successful in 3s
This commit is contained in:
@@ -1,33 +1,33 @@
|
||||
// components/Chat.js
|
||||
import { Tag } from "sigpro";
|
||||
import { h } from "sigpro";
|
||||
|
||||
export const Chat = (props, children) => {
|
||||
children === undefined && (children = props, props = {});
|
||||
return Tag("div", { ...props, class: `chat ${props.class ?? ''}` }, children);
|
||||
return h("div", { ...props, class: `chat ${props.class ?? ''}` }, children);
|
||||
};
|
||||
|
||||
export const ChatImage = (props, children) => {
|
||||
children === undefined && (children = props, props = {});
|
||||
return Tag("div", { ...props, class: `chat-image avatar ${props.class ?? ''}` },
|
||||
Tag("div", { class: "w-10 rounded-full" },
|
||||
typeof children === "string" ? Tag("img", { src: children, alt: "avatar" }) : children
|
||||
return h("div", { ...props, class: `chat-image avatar ${props.class ?? ''}` },
|
||||
h("div", { class: "w-10 rounded-full" },
|
||||
typeof children === "string" ? h("img", { src: children, alt: "avatar" }) : children
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
export const ChatHeader = (props, children) => {
|
||||
children === undefined && (children = props, props = {});
|
||||
return Tag("div", { ...props, class: `chat-header ${props.class ?? ''}` }, children);
|
||||
return h("div", { ...props, class: `chat-header ${props.class ?? ''}` }, children);
|
||||
};
|
||||
|
||||
export const ChatFooter = (props, children) => {
|
||||
children === undefined && (children = props, props = {});
|
||||
return Tag("div", { ...props, class: `chat-footer ${props.class ?? ''}` }, children);
|
||||
return h("div", { ...props, class: `chat-footer ${props.class ?? ''}` }, children);
|
||||
};
|
||||
|
||||
export const ChatBubble = (props, children) => {
|
||||
children === undefined && (children = props, props = {});
|
||||
return Tag("div", { ...props, class: `chat-bubble ${props.class ?? ''}` }, children);
|
||||
return h("div", { ...props, class: `chat-bubble ${props.class ?? ''}` }, children);
|
||||
};
|
||||
|
||||
export const ChatMessage = (props) => {
|
||||
|
||||
Reference in New Issue
Block a user