diff options
| author | Pinapelz <yukais@pinapelz.com> | 2023-11-22 21:58:45 -0800 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2023-11-22 21:58:45 -0800 |
| commit | 77a0b69d9a0dd755a0a59a4c1dc3f3d045327e89 (patch) | |
| tree | 423c31591b868e0ccd4577c9b259f4895918f164 /src/components/TitleBar | |
| parent | 02e1e6ad3a4ca2a52e1045b5ed62858e55d8159b (diff) | |
feat: re-implement individual statistic pages on next
Diffstat (limited to 'src/components/TitleBar')
| -rw-r--r-- | src/components/TitleBar/TitleBar.tsx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/components/TitleBar/TitleBar.tsx b/src/components/TitleBar/TitleBar.tsx new file mode 100644 index 0000000..85fbfbd --- /dev/null +++ b/src/components/TitleBar/TitleBar.tsx @@ -0,0 +1,26 @@ +import React from 'react'; + +interface TitleBarProps { + title: string; + redirectUrl?: string; + showHomeButton?: boolean; +} + +const TitleBar: React.FC<TitleBarProps> = ({ title, redirectUrl, showHomeButton }) => { + return ( + <div className="title-bar p-5 shadow-md" style={{ backgroundColor: '#2D4B71' }}> + <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}> + <a href={redirectUrl}> + <span className="text-white text-4xl font-bold">{title}</span> + </a> + {showHomeButton && ( + <a href="/"> + <button className="bg-white text-blue-500 hover:bg-blue-500 hover:text-white font-bold py-2 px-4 rounded-full">Home</button> + </a> + )} + </div> + </div> + ); +}; + +export default TitleBar;
\ No newline at end of file |
