Files
oldboy/src/lib/TopBar.svelte
2025-10-14 21:58:12 +02:00

52 lines
920 B
Svelte

<script lang="ts">
import { Code2 } from 'lucide-svelte';
interface Props {
title?: string;
children?: import('svelte').Snippet;
}
let { title = 'oldboy', children }: Props = $props();
</script>
<div class="top-bar">
<div class="title-section">
<Code2 size={20} />
<span class="title">{title}</span>
</div>
<div class="actions">
{@render children?.()}
</div>
</div>
<style>
.top-bar {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.75rem 1rem;
background-color: #1a1a1a;
border-bottom: 1px solid #333;
height: 48px;
box-sizing: border-box;
}
.title-section {
display: flex;
align-items: center;
gap: 0.5rem;
color: rgba(255, 255, 255, 0.87);
}
.title {
font-weight: 600;
font-size: 1rem;
}
.actions {
display: flex;
gap: 0.5rem;
align-items: center;
}
</style>