Files
BRETT/app/components/ui/sidebar/SidebarTrigger.vue
T
2026-10-03 23:45:04 +02:00

28 lines
632 B
Vue

<script setup lang="ts">
import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button'
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-sm"
:class="cn('', props.class)"
@click="toggleSidebar"
>
<Icon name="ph:sidebar-fill" class="cn-rtl-flip" />
<span class="sr-only">{{ $t('misc.toggleSidebar') }}</span>
</Button>
</template>