-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set CSS variable for adaptive width instead of width
#114
Labels
enhancement
New feature or request
Comments
For now, I'm working around this like this: <ListboxOptions
class="list"
@vue:updated="
({ el }) => {
if (el?.tagName !== 'UL') return;
el.style.minWidth = el.style.width;
el.style.width = '';
}
"
> This is in Vue. In React I guess you'd attach a ref and set the style on that. |
Hi @vincerubinetti, I've added the width attribute option for Below example change the width attribute to Usage (React)<Float adaptive-width={{ attribute: 'min-width' }}> Usage (Vue)<Float :adaptive-width="{ attribute: 'min-width' }"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For various reasons, I need to have
portal
on my<Float>
, and I want theadaptiveWidth
option to set themin-width
on the dropdown instead of thewidth
. It'd be cool if the package set a variable like--width
, so we could use the trigger width however we want. Or, you could passwidth: number
as a render/slot prop for theContent
component.The text was updated successfully, but these errors were encountered: