Skip to content

Commit

Permalink
feat(v-nav-drawer): allow to hide toggle via hideToggle prop
Browse files Browse the repository at this point in the history
  • Loading branch information
gravitano committed Sep 27, 2021
1 parent 5259d9e commit 151dbcf
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/components/VNavDrawer/VNavDrawer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,14 @@ const props = defineProps({
type: String,
default: '',
},
hideToggle: {
type: Boolean,
default: false,
},
});
const {modelValue, mini, menus, logoProps, dark, color} = toRefs(props);
const {modelValue, mini, menus, logoProps, dark, color, hideToggle} =
toRefs(props);
const emit = defineEmits(['update:modelValue', 'update:mini']);
Expand Down Expand Up @@ -73,7 +78,7 @@ const bgColor = computed(() =>
z-20
min-h-screen
shadow-md
p-4
p-2
transition-all
duration-300
flex flex-col
Expand All @@ -82,11 +87,12 @@ const bgColor = computed(() =>
bgColor,
mini
? 'w-10/12 sm:w-[85px]'
: 'transform -translate-x-full sm:transform-none sm:w-[250px]',
: 'transform -translate-x-full sm:transform-none sm:w-[260px]',
]"
>
<div class="hidden sm:block">
<v-btn
v-if="!hideToggle"
size="sm"
icon
rounded
Expand Down

0 comments on commit 151dbcf

Please sign in to comment.