Add variable width to sidebar
This commit is contained in:
parent
177b661d50
commit
b2117cdecf
|
@ -1,6 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div class="fixed shadow-2xl bg-gray-600 right-0 top-0 h-full flex flex-col group is-bright" :class="widths[max]">
|
||||||
class="fixed w-full w-[80vw] max-w-[40rem] shadow-2xl bg-gray-600 right-0 top-0 h-full flex flex-col group is-bright">
|
|
||||||
<suspense>
|
<suspense>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
|
|
||||||
|
@ -18,4 +17,20 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
defineEmits(['close']);
|
defineEmits(['close']);
|
||||||
|
|
||||||
|
const widths = {
|
||||||
|
40: 'w-full w-[80vw] max-w-[40rem]',
|
||||||
|
30: 'w-full w-[80vw] max-w-[30rem]',
|
||||||
|
20: 'w-full w-[80vw] max-w-[20rem]',
|
||||||
|
10: 'w-full w-[80vw] max-w-[10rem]',
|
||||||
|
0: '',
|
||||||
|
};
|
||||||
|
|
||||||
|
defineProps({
|
||||||
|
max: {
|
||||||
|
default: () => 40,
|
||||||
|
type: Number,
|
||||||
|
required: false,
|
||||||
|
},
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue