Fix applying styles to Popover.

This commit is contained in:
Sam Rose 2025-01-28 10:13:05 +00:00
parent 69b5dce48a
commit 0c4c2547cd
No known key found for this signature in database
1 changed files with 6 additions and 1 deletions

View File

@ -240,7 +240,12 @@ export default function positionDropdown(element: HTMLElement, opts: Opts) {
} }
for (const [key, value] of Object.entries(styles)) { for (const [key, value] of Object.entries(styles)) {
element.style.setProperty(key, value ? `${value}px` : null) const name = key as keyof Styles
if (value != null) {
element.style[name] = `${value}px`
} else {
element.style[name] = ""
}
} }
} }