Installing basic UI
This commit is contained in:
51
src/lib/TopBar.svelte
Normal file
51
src/lib/TopBar.svelte
Normal file
@ -0,0 +1,51 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user