10 lines
228 B
TypeScript
10 lines
228 B
TypeScript
import { ref } from "vue";
|
|
|
|
export const useSidebar = () => {
|
|
const isSidebarOpen = ref(true);
|
|
const toggleSidebar = () => {
|
|
isSidebarOpen.value = !isSidebarOpen.value;
|
|
};
|
|
return { isSidebarOpen, toggleSidebar };
|
|
};
|