From 2e1cdba8d3915bd6087a195ed2c9fc9f70740fe8 Mon Sep 17 00:00:00 2001 From: zdl <3489966805@qq.com> Date: Fri, 31 Oct 2025 17:50:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EventDescriptionSection.js | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/views/Community/components/DynamicNewsDetail/EventDescriptionSection.js diff --git a/src/views/Community/components/DynamicNewsDetail/EventDescriptionSection.js b/src/views/Community/components/DynamicNewsDetail/EventDescriptionSection.js new file mode 100644 index 00000000..6260e985 --- /dev/null +++ b/src/views/Community/components/DynamicNewsDetail/EventDescriptionSection.js @@ -0,0 +1,42 @@ +// src/views/Community/components/DynamicNewsDetail/EventDescriptionSection.js +// 事件描述区组件 + +import React from 'react'; +import { + Box, + Heading, + Text, + useColorModeValue, +} from '@chakra-ui/react'; + +/** + * 事件描述区组件 + * @param {Object} props + * @param {string} props.description - 事件描述文本 + */ +const EventDescriptionSection = ({ description }) => { + const sectionBg = useColorModeValue('gray.50', 'gray.750'); + const headingColor = useColorModeValue('gray.700', 'gray.200'); + const textColor = useColorModeValue('gray.600', 'gray.400'); + + // 如果没有描述,不渲染 + if (!description) { + return null; + } + + return ( + + {/* 事件描述 */} + + + 事件描述 + + + {description} + + + + ); +}; + +export default EventDescriptionSection;