2025-10-20 08:57:51 +02:00
|
|
|
<script setup lang="ts">
|
2026-02-17 10:35:03 +01:00
|
|
|
import type { HTMLAttributes } from "vue"
|
|
|
|
|
import { PanelLeft } from "lucide-vue-next"
|
|
|
|
|
import { cn } from "@/lib/utils"
|
2025-10-20 08:57:51 +02:00
|
|
|
import { Button } from '@/components/ui/button'
|
2026-02-17 10:35:03 +01:00
|
|
|
import { useSidebar } from "./utils"
|
2025-10-20 08:57:51 +02:00
|
|
|
|
|
|
|
|
const props = defineProps<{
|
2026-02-17 10:35:03 +01:00
|
|
|
class?: HTMLAttributes["class"]
|
2025-10-20 08:57:51 +02:00
|
|
|
}>()
|
|
|
|
|
|
|
|
|
|
const { toggleSidebar } = useSidebar()
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<Button
|
|
|
|
|
data-sidebar="trigger"
|
|
|
|
|
variant="ghost"
|
|
|
|
|
size="icon"
|
|
|
|
|
:class="cn('h-7 w-7', props.class)"
|
|
|
|
|
@click="toggleSidebar"
|
|
|
|
|
>
|
2026-02-17 10:35:03 +01:00
|
|
|
<PanelLeft />
|
2025-10-20 08:57:51 +02:00
|
|
|
<span class="sr-only">Toggle Sidebar</span>
|
|
|
|
|
</Button>
|
|
|
|
|
</template>
|