This repository has been archived on 2025-12-04. You can view files and clone it. You cannot open issues or pull requests or push a commit.
2025-10-20 08:57:51 +02:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
import type { HTMLAttributes } from 'vue'
|
|
|
|
|
import { cn } from '@/lib/utils'
|
|
|
|
|
import { Button } from '@/components/ui/button'
|
|
|
|
|
import { PanelLeft } from 'lucide-vue-next'
|
|
|
|
|
import { useSidebar } from './utils'
|
|
|
|
|
|
|
|
|
|
const props = defineProps<{
|
|
|
|
|
class?: HTMLAttributes['class']
|
|
|
|
|
}>()
|
|
|
|
|
|
|
|
|
|
const { toggleSidebar } = useSidebar()
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<Button
|
|
|
|
|
data-sidebar="trigger"
|
|
|
|
|
data-slot="sidebar-trigger"
|
|
|
|
|
variant="ghost"
|
|
|
|
|
size="icon"
|
|
|
|
|
:class="cn('h-7 w-7', props.class)"
|
|
|
|
|
@click="toggleSidebar"
|
|
|
|
|
>
|
2025-10-23 10:24:48 +02:00
|
|
|
<PanelLeft stroke-width="1.5" />
|
2025-10-20 08:57:51 +02:00
|
|
|
<span class="sr-only">Toggle Sidebar</span>
|
|
|
|
|
</Button>
|
|
|
|
|
</template>
|