34 lines
1.3 KiB
JavaScript
34 lines
1.3 KiB
JavaScript
// src/views/Community/components/ImportanceLegend.js
|
|
import React from 'react';
|
|
import { Card, Space, Badge } from 'antd';
|
|
|
|
const ImportanceLegend = () => {
|
|
const levels = [
|
|
{ level: 'S', color: '#ff4d4f', description: '重大事件,市场影响深远' },
|
|
{ level: 'A', color: '#faad14', description: '重要事件,影响较大' },
|
|
{ level: 'B', color: '#1890ff', description: '普通事件,有一定影响' },
|
|
{ level: 'C', color: '#52c41a', description: '参考事件,影响有限' }
|
|
];
|
|
|
|
return (
|
|
<Card title="重要性等级说明" className="importance-legend">
|
|
<Space direction="vertical" style={{ width: '100%' }}>
|
|
{levels.map(item => (
|
|
<div key={item.level} style={{ display: 'flex', alignItems: 'center' }}>
|
|
<Badge
|
|
color={item.color}
|
|
text={
|
|
<span>
|
|
<strong style={{ marginRight: 8 }}>{item.level}级</strong>
|
|
{item.description}
|
|
</span>
|
|
}
|
|
/>
|
|
</div>
|
|
))}
|
|
</Space>
|
|
</Card>
|
|
);
|
|
};
|
|
|
|
export default ImportanceLegend; |