@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
23 lines (22 loc) • 916 B
JavaScript
import * as React from 'react';
import { MenuIcon } from '../../../icons';
import Stack from '@mui/material/Stack';
import Box from '@mui/material/Box';
import IconButton from '@mui/material/IconButton';
import { useMobile } from '../../../ui/Responsive';
import { getSurfaceColor } from "../../utils/colors";
const ChatMobileAppBar = ({ apiRef }) => {
const isMobile = useMobile();
const handleClick = () => {
apiRef.current?.setMenuDrawerOpen?.(true);
};
if (!isMobile)
return null;
return (React.createElement(Stack, { height: 64, paddingX: 1, justifyContent: "center", sx: {
backgroundColor: (theme) => getSurfaceColor(theme),
} },
React.createElement(Box, null,
React.createElement(IconButton, { onClick: handleClick },
React.createElement(MenuIcon, null)))));
};
export default ChatMobileAppBar;