26 lines
760 B
Vue
26 lines
760 B
Vue
<script setup lang="ts">
|
|
// The panel on the left, hidden, shrinks to this strip; its buttons bring it back.
|
|
const ed = useEditor()
|
|
|
|
const TABS = [
|
|
{ id: 'circuit', label: 'This', icon: 'lucide:cpu' },
|
|
{ id: 'pins', label: 'Pins', icon: 'lucide:list' },
|
|
] as const
|
|
|
|
function openTab(id: (typeof TABS)[number]['id']) {
|
|
ed.panelTab.value = id
|
|
ed.togglePanel(true)
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<aside class="rail">
|
|
<button class="rail-btn" title="Show the panel ([)" @click="ed.togglePanel(true)">
|
|
<Icon name="lucide:panel-left-open" class="size-4" />
|
|
</button>
|
|
<button v-for="t in TABS" :key="t.id" class="rail-btn" :title="t.label" @click="openTab(t.id)">
|
|
<Icon :name="t.icon" class="size-4" />
|
|
</button>
|
|
</aside>
|
|
</template>
|