From 6f998ef9566b9f45611b15a29ba1f8ba41a92c61 Mon Sep 17 00:00:00 2001 From: Rankin Zheng Date: Fri, 5 May 2023 09:48:05 +0800 Subject: [PATCH] feat: Add avatars and icons to chat panel Add avatars and icons to the chat panel to improve the user interface. Also, add a demo code block to show how to use the Button component. The demo code block is currently commented out. --- src/views/ChatPanel.tsx | 55 ++++++++++++++++++++++++++++++++++------- 1 file changed, 46 insertions(+), 9 deletions(-) diff --git a/src/views/ChatPanel.tsx b/src/views/ChatPanel.tsx index 1511fd8..0ad03fd 100644 --- a/src/views/ChatPanel.tsx +++ b/src/views/ChatPanel.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { useState } from 'react'; -import { Container } from '@mantine/core'; +import { Avatar, Container, Divider, Flex, Grid, Stack } from '@mantine/core'; import { Input, Tooltip } from '@mantine/core'; import { List } from '@mantine/core'; import { ScrollArea } from '@mantine/core'; @@ -8,8 +8,9 @@ import { createStyles } from '@mantine/core'; import { ActionIcon } from '@mantine/core'; import { Menu, Button, Text } from '@mantine/core'; import { useViewportSize } from '@mantine/hooks'; -import { IconSend, IconSquareRoundedPlus } from '@tabler/icons-react'; +import { IconEdit, IconRobot, IconSend, IconSquareRoundedPlus, IconUser } from '@tabler/icons-react'; import { IconSettings, IconSearch, IconPhoto, IconMessageCircle, IconTrash, IconArrowsLeftRight } from '@tabler/icons-react'; +import { Prism } from '@mantine/prism'; const useStyles = createStyles((theme, _params, classNames) => ({ panel: { @@ -46,6 +47,11 @@ const chatPanel = () => { const { classes } = useStyles(); const { height, width } = useViewportSize(); + const demoCode = `import { Button } from '@mantine/core'; + function Demo() { + return + }`; + const handlePlusBottonClick = (event: React.MouseEvent) => { setOpened(!opened); event.stopPropagation(); @@ -66,13 +72,44 @@ const chatPanel = () => { return ( - - Clone or download repository from GitHub - Install dependencies with yarn - To start development server run npm start command - Run tests to make sure your changes do not break the build - Submit a pull request once you are done - + + + + + + Write a hello world, and explain it. + + + + + + + + + + + {/* {demoCode} */} + + Write a hello world, and explain it. + + + + +