feat: 拆分BackgroundEffects 背景渐变装饰层

This commit is contained in:
zdl
2025-11-24 15:12:24 +08:00
parent ef7f91ba77
commit 851c148f7d

View File

@@ -0,0 +1,59 @@
// src/views/AgentChat/components/BackgroundEffects.js
// 背景渐变装饰层组件
import React from 'react';
import { Box } from '@chakra-ui/react';
/**
* BackgroundEffects - 背景渐变装饰层
*
* 包含主背景渐变和两个装饰光效(右上紫色、左下蓝色)
*
* @returns {JSX.Element}
*/
const BackgroundEffects = () => {
return (
<>
{/* 主背景渐变层 */}
<Box
position="absolute"
top={0}
left={0}
right={0}
bottom={0}
bgGradient="linear(to-br, gray.900, gray.800, purple.900)"
zIndex={0}
/>
{/* 右上角紫色光效 */}
<Box
position="absolute"
top="0"
right="-20%"
width="600px"
height="600px"
bgGradient="radial(circle, purple.600, transparent)"
opacity="0.15"
filter="blur(100px)"
pointerEvents="none"
zIndex={0}
/>
{/* 左下角蓝色光效 */}
<Box
position="absolute"
bottom="-30%"
left="-10%"
width="500px"
height="500px"
bgGradient="radial(circle, blue.600, transparent)"
opacity="0.1"
filter="blur(100px)"
pointerEvents="none"
zIndex={0}
/>
</>
);
};
export default BackgroundEffects;