@lui-ui/lui-vue
Version:
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
24 lines (23 loc) • 853 B
JavaScript
import { computed } from "vue";
export function useMenuStyles(params) {
const classes = computed(() => {
const optionsWrapper = {
width: "w-max",
maxWidth: "max-w-max",
zIndex: "z-50",
maxHeight: "max-h-96",
minWidth: !params.teleport.value ? "min-w-full" : "",
overflow: "overflow-y-auto",
backgroundColor: "bg-secondary-50 dark:bg-secondary-900",
borderWidth: "border",
borderColor: "border-secondary-200 dark:border-secondary-700",
borderRadius: {
"rounded-md": params.rounded && params.rounded.value === true,
"rounded-2xl": params.rounded && params.rounded.value === "full"
},
boxShadow: "shadow-lg"
};
return Object.values({ ...optionsWrapper });
});
return { classes: params.menuClasses.value.length > 0 ? params.menuClasses : classes };
}