Update themed components with refs and css
This commit is contained in:
@@ -1,23 +1,26 @@
|
||||
import type { MessageBlockProps } from "$/types/MessageTypes";
|
||||
import clsx from "clsx";
|
||||
import { forwardRef } from "react";
|
||||
import MessageBlock from "./MessageBlock";
|
||||
|
||||
|
||||
export default function DarkMessageBlock(props: MessageBlockProps){
|
||||
const {
|
||||
className,
|
||||
...messageProps
|
||||
} = props;
|
||||
|
||||
|
||||
const DarkMessageBlock = forwardRef<HTMLDivElement, MessageBlockProps>(({
|
||||
className,
|
||||
...messageProps
|
||||
}, ref ) => {
|
||||
return (
|
||||
<MessageBlock
|
||||
data-testid="mattrixwv-dark-message-block"
|
||||
{...messageProps}
|
||||
className={clsx(
|
||||
className,
|
||||
"bg-black text-white"
|
||||
"bg-dark text-dark-xlight"
|
||||
)}
|
||||
ref={ref}
|
||||
/>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
DarkMessageBlock.displayName = "DarkMessageBlock";
|
||||
|
||||
export default DarkMessageBlock;
|
||||
|
||||
Reference in New Issue
Block a user