antoniandre / wave-ui

A UI framework for Vue.js 3 (and 2) with only the bright side. ☀️
https://antoniandre.github.io/wave-ui
MIT License
544 stars 39 forks source link

[w-menu] Add max width prop #126

Closed DerrikMilligan closed 10 months ago

DerrikMilligan commented 11 months ago

The w-menu component currently supports a min-width prop allowing activator to be passed in to ensure that the menu will never be a smaller width than the activator. However it would also be nice to be able to do the same with a max width for w-select in particular so that the menu doesn't expand beyond the width of the activator, if desired.

Here is a codepen showing the overflow from the w-select where the w-menu expands beyond the width of the select.

image

And here is what this looks like if there is a max-width on the w-menu.

image

This doesn't override any base functionality so it shouldn't break any existing code. Just give additional options.

antoniandre commented 10 months ago

Makes sense! Thanks for the PR!

antoniandre commented 10 months ago

Released in version 3.7.0