Files
fredy/ui/src/components/segment/SegmentPart.jsx

19 lines
407 B
React
Raw Normal View History

2022-03-27 19:42:58 +02:00
import React from 'react';
2023-03-20 08:52:13 +01:00
import { Card } from '@douyinfe/semi-ui';
2022-03-27 19:42:58 +02:00
import './SegmentParts.less';
2023-03-20 08:52:13 +01:00
export const SegmentPart = ({ name, Icon = null, children, helpText }) => {
const { Meta } = Card;
2022-03-27 19:42:58 +02:00
2023-03-20 08:52:13 +01:00
return (
<Card
title={
<Meta title={name} description={helpText} avatar={Icon == null ? null : <Icon size="extra-extra-small" />} />
2022-03-27 19:42:58 +02:00
}
2023-03-20 08:52:13 +01:00
>
2022-03-27 19:42:58 +02:00
{children}
2023-03-20 08:52:13 +01:00
</Card>
);
};