aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/TitleBar
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/TitleBar')
-rw-r--r--src/components/TitleBar/TitleBar.tsx71
1 files changed, 45 insertions, 26 deletions
diff --git a/src/components/TitleBar/TitleBar.tsx b/src/components/TitleBar/TitleBar.tsx
index 171e03a..127534e 100644
--- a/src/components/TitleBar/TitleBar.tsx
+++ b/src/components/TitleBar/TitleBar.tsx
@@ -1,32 +1,51 @@
-import React from 'react';
-import '../TitleBar/TitleBarStyle.css'
-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
-import { faHouse } from '@fortawesome/free-solid-svg-icons'
+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;
+ 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>
- </>
- );
+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; \ No newline at end of file
+export default TitleBar;
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage