mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
27 lines
654 B
JavaScript
27 lines
654 B
JavaScript
/*
|
|
* Copyright (c) 2026 by Christian Kellner.
|
|
* Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause
|
|
*/
|
|
|
|
import React from 'react';
|
|
import { Card } from '@douyinfe/semi-ui-19';
|
|
|
|
import './SegmentParts.less';
|
|
|
|
export const SegmentPart = ({ name, Icon = null, children, helpText = null, className = '' }) => {
|
|
const { Meta } = Card;
|
|
|
|
return (
|
|
<Card
|
|
className={`segmentParts ${className}`}
|
|
title={
|
|
(helpText || name) && (
|
|
<Meta title={name} description={helpText} avatar={Icon == null ? null : <Icon size="extra-extra-small" />} />
|
|
)
|
|
}
|
|
>
|
|
{children}
|
|
</Card>
|
|
);
|
|
};
|