blob: 171e03ac73b96a93370efae61530e4c4a21ad5f1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
import React from 'react';
import '../TitleBar/TitleBarStyle.css'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faHouse } from '@fortawesome/free-solid-svg-icons'
interface TitleBarProps {
title: string;
redirectUrl?: string;
showHomeButton?: boolean;
backgroundColor?: string;
}
const TitleBar: React.FC<TitleBarProps> = ({ title, redirectUrl, showHomeButton, backgroundColor }) => {
return (
<>
<div className="title-bar p-5 shadow-md" style={{ backgroundColor: backgroundColor || '#2D4B71' }}>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
<a href={redirectUrl}>
<span className="text-white text-4xl font-bold" style={{ fontFamily: 'Quantico, sans-serif' }}>{title}</span>
</a>
{showHomeButton && (
<a href="/" className='text-white text-3xl'>
<FontAwesomeIcon icon={faHouse} />
</a>
)}
</div>
</div>
</>
);
};
export default TitleBar;
|