mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
28 lines
690 B
JavaScript
28 lines
690 B
JavaScript
import React from 'react';
|
|
import { Header, Icon, Popup, Segment } from 'semantic-ui-react';
|
|
|
|
import './SegmentParts.less';
|
|
|
|
export const SegmentPart = ({ name, icon = null, children, helpText }) => (
|
|
<Segment inverted>
|
|
<Header as="h5" inverted sub>
|
|
{icon && <Icon name={icon} inverted size="mini" />}
|
|
<Header.Content>{name}</Header.Content>
|
|
</Header>
|
|
|
|
<Popup
|
|
content={helpText}
|
|
trigger={
|
|
<span className="generalSettings__help">
|
|
{' '}
|
|
<Icon name="help circle" inverted />
|
|
What is this?
|
|
</span>
|
|
}
|
|
/>
|
|
<Segment inverted className="segmentParts">
|
|
{children}
|
|
</Segment>
|
|
</Segment>
|
|
);
|