mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-19 06:30:10 +08:00
refactor: update AddButton styling based on topic position and clean up CSS for root element
This commit is contained in:
parent
1c0de625d8
commit
edd6b11aa7
@ -41,11 +41,11 @@ body,
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* #root {
|
||||
#root {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex: 1;
|
||||
} */
|
||||
}
|
||||
|
||||
body {
|
||||
display: flex;
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import { useSettings } from '@renderer/hooks/useSettings'
|
||||
import type { ButtonProps } from 'antd'
|
||||
import { Button } from 'antd'
|
||||
import { PlusIcon } from 'lucide-react'
|
||||
@ -19,9 +20,12 @@ const StyledButton = styled(Button)`
|
||||
`
|
||||
|
||||
const AddButton: FC<ButtonProps> = ({ ...props }) => {
|
||||
const { topicPosition } = useSettings()
|
||||
|
||||
return (
|
||||
<StyledButton
|
||||
{...props}
|
||||
style={{ borderRadius: topicPosition === 'left' ? 20 : 8 }}
|
||||
type="text"
|
||||
onClick={props.onClick}
|
||||
icon={<PlusIcon size={16} style={{ flexShrink: 0 }} />}>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user