feat: add theme color param to widget
This commit is contained in:
@@ -9,10 +9,11 @@ import useSSE from '../useSSE';
|
||||
|
||||
type Props = {
|
||||
hostId: number,
|
||||
themeColor?: string,
|
||||
handleClose: () => void
|
||||
}
|
||||
|
||||
const Index = ({ handleClose, hostId }: Props) => {
|
||||
const Index = ({ handleClose, hostId, themeColor }: Props) => {
|
||||
// 建立SSE连接
|
||||
useSSE();
|
||||
const { user: loginUser, token, guest: isGuest } = useAppSelector(store => store.authData);
|
||||
@@ -21,7 +22,7 @@ const Index = ({ handleClose, hostId }: Props) => {
|
||||
const notLogin = !token || isGuest;
|
||||
return (
|
||||
<aside className="flex flex-col bg-white w-full h-full rounded-md overflow-hidden">
|
||||
<Header handleClose={handleClose} />
|
||||
<Header themeColor={themeColor} handleClose={handleClose} />
|
||||
{/* message list */}
|
||||
<main id='MESSAGE_LIST_CONTAINER' className="relative flex-1 overflow-y-auto scroll-smooth">
|
||||
{/* placeholder */}
|
||||
|
||||
Reference in New Issue
Block a user