Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2d94d23

Browse files
committedMar 20, 2025
feat: make SingleChatCreate customizable
1 parent fa34489 commit 2d94d23

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2856
-2763
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
'use client'
2+
3+
import { FC } from 'react'
4+
5+
import { IconButton } from '@baseapp-frontend/design-system/components/web/buttons'
6+
import { Iconify } from '@baseapp-frontend/design-system/components/web/images'
7+
8+
import { Box, Typography } from '@mui/material'
9+
10+
import { HeaderContainer } from './styled'
11+
12+
const Header: FC<{ onHeaderClick: () => void }> = ({ onHeaderClick }) => (
13+
<HeaderContainer>
14+
<Box
15+
display="grid"
16+
width="100%"
17+
gridTemplateColumns="24px auto 24px"
18+
gap={1.5}
19+
alignItems="center"
20+
>
21+
<IconButton
22+
aria-label="return to existing chat rooms"
23+
onClick={onHeaderClick}
24+
sx={{ maxWidth: 'fit-content' }}
25+
>
26+
<Iconify icon="eva:arrow-ios-back-fill" width={24} />
27+
</IconButton>
28+
<Typography component="span" variant="subtitle2" sx={{ textAlign: 'center' }}>
29+
New Chat
30+
</Typography>
31+
<div />
32+
</Box>
33+
</HeaderContainer>
34+
)
35+
36+
export default Header
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { ComponentType } from 'react'
2+
3+
import { Box, BoxProps } from '@mui/material'
4+
import { styled } from '@mui/material/styles'
5+
6+
export const HeaderContainer: ComponentType<BoxProps> = styled(Box)(({ theme }) => ({
7+
borderBottom: `1px ${theme.palette.divider} solid`,
8+
width: '100%',
9+
padding: `${theme.spacing(2)}`,
10+
[theme.breakpoints.down('sm')]: {
11+
padding: `${theme.spacing(2)} ${theme.spacing(1.5)} ${theme.spacing(2)}`,
12+
},
13+
}))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export interface HeaderProps {
2+
onHeaderClick: () => void
3+
}
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Failed to load comments.