mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-28 17:55:15 +02:00
* fix: rearrange ui * fix: make request on load * fix: default to the first environment * feat: add codemirror * fix: layout * fix: styling * feat: add popover * feat: variant popover * fix: add sticky * feat: resolve input * refactor: date field * fix: move deps * fix: clean up any * fix: resolve import * fix: hide columns on mobile * fix: search style * fix: rename styles * fix: PR comments * fix: add popover for guidance * fix: guidance popover * fix: verbose function * fix: wording Co-authored-by: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com>
45 lines
1.5 KiB
TypeScript
45 lines
1.5 KiB
TypeScript
import { Box, Typography } from '@mui/material';
|
|
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
|
|
import { GuidanceIndicator } from 'component/common/GuidanceIndicator/GuidanceIndicator';
|
|
import { VFC } from 'react';
|
|
|
|
interface IPlaygroundGuidanceSectionProps {
|
|
headerText: string;
|
|
bodyText?: string;
|
|
sectionNumber: string;
|
|
}
|
|
|
|
export const PlaygroundGuidanceSection: VFC<
|
|
IPlaygroundGuidanceSectionProps
|
|
> = ({ headerText, bodyText, sectionNumber }) => {
|
|
return (
|
|
<Box
|
|
sx={{
|
|
display: 'flex',
|
|
alignItems: 'flex-start',
|
|
mt: 2,
|
|
flexDirection: 'column',
|
|
}}
|
|
>
|
|
<Box sx={{ display: 'flex' }}>
|
|
<Box>
|
|
<GuidanceIndicator>{sectionNumber}</GuidanceIndicator>
|
|
</Box>
|
|
<Box sx={{ ml: 2, display: 'flex', flexDirection: 'column' }}>
|
|
<Typography variant="body1" sx={{ fontWeight: 'bold' }}>
|
|
{headerText}
|
|
</Typography>
|
|
<ConditionallyRender
|
|
condition={Boolean(bodyText)}
|
|
show={
|
|
<Typography variant="body1" sx={{ mt: 1 }}>
|
|
{bodyText}
|
|
</Typography>
|
|
}
|
|
/>
|
|
</Box>
|
|
</Box>
|
|
</Box>
|
|
);
|
|
};
|