Files
blitzkit/src/components/TitleBar.tsx
T

75 lines
1.7 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
2023-05-28 02:25:59 +00:00
export interface TitleBarProps {
name: string;
image?: string;
description?: string;
}
2023-10-11 18:26:35 -05:00
export default function TitleBar({ name, image, description }: TitleBarProps) {
2023-05-28 02:25:59 +00:00
return (
<div
style={{
display: 'flex',
alignItems: 'center',
2023-08-06 18:53:57 +00:00
justifyContent: 'center',
overflow: 'hidden',
2023-05-28 02:25:59 +00:00
}}
>
2023-08-06 18:53:57 +00:00
<div style={{ display: 'flex', gap: 8 }}>
2023-05-30 17:24:24 +00:00
{image && (
<img
style={{ width: 64, height: 64, objectFit: 'contain' }}
src={image}
/>
)}
2023-05-28 02:25:59 +00:00
2023-05-30 17:24:24 +00:00
<div
2023-08-06 18:53:57 +00:00
style={{
display: 'flex',
flexDirection: 'column',
2023-10-11 18:26:35 -05:00
justifyContent: 'center',
2023-08-06 18:53:57 +00:00
gap: 4,
}}
2023-05-30 17:24:24 +00:00
>
<div
2023-05-28 02:25:59 +00:00
style={{
2023-05-30 17:24:24 +00:00
display: 'flex',
2023-05-28 02:25:59 +00:00
gap: 4,
2024-01-19 20:47:46 -06:00
alignItems: 'center',
justifyContent: 'center',
2023-05-28 02:25:59 +00:00
}}
>
2023-05-30 17:24:24 +00:00
<span
style={{
fontSize: 32,
color: theme.colors.textHighContrast,
fontWeight: 900,
whiteSpace: 'nowrap',
2023-08-06 18:53:57 +00:00
overflow: 'hidden',
2023-05-30 17:24:24 +00:00
}}
>
{name}
</span>
</div>
2023-05-28 02:25:59 +00:00
2024-01-19 20:47:46 -06:00
<div
style={{
display: 'flex',
justifyContent: image ? 'flex-start' : 'center',
}}
>
<span
style={{
color: theme.colors.textLowContrast,
fontSize: 16,
}}
>
{description}
</span>
</div>
2023-05-28 02:25:59 +00:00
</div>
</div>
</div>
);
}