@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
29 lines (28 loc) • 1.01 kB
JavaScript
import * as React from 'react';
import Paper from '@mui/material/Paper';
import { styled } from '@mui/material/styles';
import { motion } from '../../utils/materialDesign/motion';
import Typography from '@mui/material/Typography';
const PaperStyled = styled(Paper)(({ theme }) => ({
borderRadius: 16,
border: `1px solid ${theme.palette.divider}`,
padding: theme.spacing(1),
width: 133,
height: 65,
display: 'flex',
alignItems: 'center',
margin: 6,
transition: theme.transitions.create('background', { duration: motion.duration.short2 }),
cursor: 'pointer',
'&:hover': {
background: theme.palette.action.hover,
},
[theme.breakpoints.down('md')]: {
margin: 4,
},
}));
const QuestionItem = ({ item, onClick }) => {
return (React.createElement(PaperStyled, { elevation: 0, onClick: () => onClick(item.message) },
React.createElement(Typography, null, item.title)));
};
export default QuestionItem;