sidebar component

This commit is contained in:
pa
2026-01-16 16:21:20 +09:00
committed by Natsumi
parent 8fd24d2914
commit 9cde6c5bb0
36 changed files with 1118 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<script setup>
import { Button } from '@/components/ui/button';
import { PanelLeft } from 'lucide-vue-next';
import { cn } from '@/lib/utils';
import { useSidebar } from './utils';
const props = defineProps({
class: {
type: [String, Array, Object],
default: undefined
}
});
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">
<PanelLeft />
<span class="sr-only">Toggle Sidebar</span>
</Button>
</template>