Files
blitzkit/src/components/TitleBar.tsx
T

52 lines
1.1 KiB
TypeScript
Raw Normal View History

2023-07-11 19:54:57 +00:00
import { theme } from '../stitches.config';
2023-05-29 18:29:02 +00:00
2024-03-12 23:36:56 -05:00
interface TitleBarProps {
2024-03-06 09:52:09 -06:00
title: string;
2023-05-28 02:25:59 +00:00
image?: string;
description?: string;
}
2024-03-06 09:52:09 -06:00
export default function TitleBar({ title, image, description }: TitleBarProps) {
2023-05-28 02:25:59 +00:00
return (
<div
style={{
2024-03-06 09:52:09 -06:00
gap: 4,
2023-05-28 02:25:59 +00:00
display: 'flex',
2024-03-06 09:52:09 -06:00
flexDirection: 'column',
2023-08-06 18:53:57 +00:00
justifyContent: 'center',
2024-03-06 09:52:09 -06:00
alignItems: 'center',
2023-05-28 02:25:59 +00:00
}}
>
2024-03-06 09:52:09 -06:00
<div
style={{
gap: 4,
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
}}
>
2023-05-30 17:24:24 +00:00
{image && (
<img
2024-03-06 09:52:09 -06:00
style={{ width: 32, height: 32, objectFit: 'contain' }}
2023-05-30 17:24:24 +00:00
src={image}
/>
)}
2023-05-28 02:25:59 +00:00
2024-03-06 09:52:09 -06:00
<span
2023-08-06 18:53:57 +00:00
style={{
2024-03-06 09:52:09 -06:00
fontSize: 32,
fontWeight: 900,
background: `linear-gradient(180deg, ${theme.colors.textHighContrast} 0%, ${theme.colors.textLowContrast} 100%)`,
backgroundClip: 'text',
2023-08-06 18:53:57 +00:00
}}
2023-05-30 17:24:24 +00:00
>
2024-03-06 09:52:09 -06:00
{title}
</span>
2023-05-28 02:25:59 +00:00
</div>
2024-03-06 09:52:09 -06:00
<span style={{ color: theme.colors.textLowContrast, fontSize: 16 }}>
{description}
</span>
2023-05-28 02:25:59 +00:00
</div>
);
}