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;