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 SecondaryMessageBlock(props: MessageBlockProps){
|
||||
const {
|
||||
className,
|
||||
...messageProps
|
||||
} = props;
|
||||
|
||||
|
||||
const SecondaryMessageBlock = forwardRef<HTMLDivElement, MessageBlockProps>(({
|
||||
className,
|
||||
...messageProps
|
||||
}, ref ) => {
|
||||
return (
|
||||
<MessageBlock
|
||||
data-testid="mattrixwv-secondary-message-block"
|
||||
{...messageProps}
|
||||
className={clsx(
|
||||
className,
|
||||
"bg-neutral-200 text-neutral-600"
|
||||
"bg-secondary-xlight text-secondary-mid"
|
||||
)}
|
||||
ref={ref}
|
||||
/>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
SecondaryMessageBlock.displayName = "SecondaryMessageBlock";
|
||||
|
||||
export default SecondaryMessageBlock;
|
||||
|
||||
Reference in New Issue
Block a user