2022-01-05 21:53:15 +03:00
|
|
|
import React, { FunctionComponent } from 'react';
|
2022-05-07 23:27:33 +03:00
|
|
|
import SectionTitleButtonElement from './SectionTitleButtonElement';
|
2022-01-05 21:53:15 +03:00
|
|
|
import SectionTitleLinkElement from './SectionTitleLinkElement';
|
|
|
|
|
|
|
|
type IProps = {
|
|
|
|
title: string;
|
2022-05-07 23:27:33 +03:00
|
|
|
isBtnVisible?: boolean;
|
|
|
|
titleLink?: string;
|
2022-01-05 21:53:15 +03:00
|
|
|
}
|
|
|
|
|
2022-05-07 23:27:33 +03:00
|
|
|
const SectionTitleContainer: FunctionComponent<IProps> = ({title, isBtnVisible, titleLink}: IProps) => {
|
2022-01-05 21:53:15 +03:00
|
|
|
return (
|
|
|
|
<div className='verticalSection'>
|
|
|
|
<div className='sectionTitleContainer flex align-items-center'>
|
|
|
|
<h2 className='sectionTitle'>
|
|
|
|
{title}
|
|
|
|
</h2>
|
2022-05-07 23:27:33 +03:00
|
|
|
|
|
|
|
{isBtnVisible && <SectionTitleButtonElement
|
|
|
|
className='fab btnAddUser submit sectionTitleButton'
|
|
|
|
title='ButtonAddUser'
|
|
|
|
icon='add'
|
|
|
|
/>}
|
|
|
|
|
2022-01-05 21:53:15 +03:00
|
|
|
<SectionTitleLinkElement
|
|
|
|
className='raised button-alt headerHelpButton'
|
|
|
|
title='Help'
|
2022-05-07 23:27:33 +03:00
|
|
|
url={titleLink}
|
2022-01-05 21:53:15 +03:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default SectionTitleContainer;
|