-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
G
committed
Dec 27, 2023
1 parent
cc37e2e
commit a198765
Showing
11 changed files
with
120 additions
and
24 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { Flex, Typography } from 'antd'; | ||
|
||
import useStyles from './styles'; | ||
|
||
import type { FC } from 'react'; | ||
|
||
const { Title, Text } = Typography; | ||
export interface PMessage { | ||
avatar?: string | JSX.Element; | ||
time?: string; | ||
content?: string | JSX.Element; | ||
user?: string; | ||
} | ||
const Message: FC<PMessage> = ({ avatar, time, content, user }) => { | ||
const { styles } = useStyles(); | ||
return ( | ||
<Flex gap={8} className={styles['message-list']}> | ||
<div>{avatar}</div> | ||
<div className='message_content'> | ||
<Flex justify={'space-between'} align='center'> | ||
<Title level={5}>{user}</Title> | ||
<div>{time}</div> | ||
</Flex> | ||
<Text type='secondary'>{content}</Text> | ||
</div> | ||
</Flex> | ||
); | ||
}; | ||
export default Message; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { createStyles } from 'antd-style'; | ||
|
||
const useStyles = createStyles(({ token }) => ({ | ||
'message-list': { | ||
'.message_content': { | ||
flex: 1, | ||
padding: token.paddingSM, | ||
backgroundColor: token.colorBgLayout, | ||
borderRadius: token.borderRadiusLG, | ||
}, | ||
}, | ||
})); | ||
export default useStyles; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { Avatar, Button, Flex, Input, Typography } from 'antd'; | ||
import { SvgIcon } from 'ui'; | ||
|
||
import avatarUser from '@/assets/images/avatar_6.jpg'; | ||
|
||
import useStyles from './styles'; | ||
|
||
import type { FC } from 'react'; | ||
|
||
const { Title, Text } = Typography; | ||
export interface PSendBox { | ||
avatar?: string | JSX.Element; | ||
time?: string; | ||
content?: string | JSX.Element; | ||
user?: string; | ||
} | ||
const SendBox: FC<PSendBox> = ({ avatar = avatarUser, time, content, user }) => { | ||
const { styles } = useStyles(); | ||
return ( | ||
<Flex gap={8} align='center' className={styles['send-box']}> | ||
<Avatar src={avatar}></Avatar> | ||
<div className='send-content'> | ||
<Input | ||
placeholder='请在这里输入您的留言' | ||
suffix={ | ||
<Flex> | ||
<Button type='text' shape='circle' icon={<SvgIcon name='picture' />}></Button> | ||
<Button type='text' shape='circle' icon={<SvgIcon name='express' />}></Button> | ||
</Flex> | ||
} | ||
/> | ||
</div> | ||
</Flex> | ||
); | ||
}; | ||
export default SendBox; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { createStyles } from 'antd-style'; | ||
|
||
const useStyles = createStyles(({ token }) => ({ | ||
'send-box': { | ||
'.send-content': { | ||
flex: 1, | ||
borderRadius: token.borderRadiusLG, | ||
}, | ||
}, | ||
})); | ||
export default useStyles; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters