@plteam/chat-ui
Version:
CUI Kit is a free and open-source library for creating AI assistant chat interfaces, built with React, Material UI, and TypeScript
19 lines (18 loc) • 806 B
JavaScript
import * as React from 'react';
import { styled } from '@mui/material/styles';
import Box from '@mui/material/Box';
const ChatMessageContainerStyled = styled(Box, { shouldForwardProp: (propName) => propName !== 'elevation' })(({ theme, elevation }) => ({
display: 'flex',
borderRadius: 24,
padding: theme.spacing(1, 3),
boxSizing: 'border-box',
[theme.breakpoints.down('sm')]: {
padding: theme.spacing(1, 2),
},
minHeight: 40,
boxShadow: elevation ? '0px 2px 16px rgba(0, 0, 0, 0.12), 0px 7px 10px rgba(0, 0, 0, 0.14), 0px 4px 5px rgba(0, 0, 0, 0.2);' : 'none',
}));
const MessageContainer = React.forwardRef((props, ref) => {
return React.createElement(ChatMessageContainerStyled, { ...props, ref: ref });
});
export default MessageContainer;