UNPKG

@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

22 lines (21 loc) 862 B
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'; 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) => theme.palette.grey[200], } }, React.createElement(Box, null, React.createElement(IconButton, { onClick: handleClick }, React.createElement(MenuIcon, null))))); }; export default ChatMobileAppBar;