-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from linqiqi077/main
style: Update agent list Style
- Loading branch information
Showing
5 changed files
with
64 additions
and
5 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
export default { | ||
index: { | ||
faXianAIZhi: '发现 AI 智能体', | ||
faXianAIZhi: '发现智能体', | ||
dengLu: '登录', | ||
tuiJian: '推荐', | ||
}, | ||
|
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
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,59 @@ | ||
'use client'; | ||
|
||
import { Flex } from 'antd'; | ||
import { createStyles } from 'antd-style'; | ||
import React from 'react'; | ||
|
||
export const useStyles = createStyles(() => ({ | ||
TitleCom: { | ||
padding: '0 24px', | ||
height: '64px', | ||
position: 'absolute', | ||
top: 0, | ||
width: '100%', | ||
zIndex: 9, | ||
overflowY: 'auto', | ||
}, | ||
title: { | ||
flex: '1 1', | ||
alignItems: 'center', | ||
display: 'flex', | ||
fontWeight: 590, | ||
fontSize: 16, | ||
flexDirection: 'column', | ||
marginLeft: '-40px', | ||
}, | ||
leftTitle: { | ||
fontWeight: 590, | ||
fontSize: 16, | ||
}, | ||
layout: { | ||
width: '100%', | ||
}, | ||
})); | ||
|
||
interface TitleComProps { | ||
to?: string; | ||
title?: string; | ||
isLeftTitle?: boolean; | ||
extra?: React.ReactNode; | ||
} | ||
|
||
const TitleCom = React.memo<TitleComProps>(props => { | ||
const { extra, isLeftTitle } = props; | ||
const { styles } = useStyles(); | ||
return ( | ||
<Flex align={'center'} className={styles.TitleCom}> | ||
{isLeftTitle ? ( | ||
<Flex align="center" className={styles.layout} justify="space-between"> | ||
<div className={styles.leftTitle}>{props.title}</div> | ||
{extra} | ||
</Flex> | ||
) : ( | ||
<div className={styles.title}>{props.title}</div> | ||
)} | ||
</Flex> | ||
); | ||
}); | ||
|
||
export default TitleCom; |