blob: 127534eaea8ed5486be33316badbd749b78790bd (
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
import type React from "react";
import "../TitleBar/TitleBarStyle.css";
import { faHouse } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
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;
|