Skip to content

Commit

Permalink
refactor: avoid $ property appearing in rect dimensions (#2700)
Browse files Browse the repository at this point in the history
  • Loading branch information
atomiks committed Jan 6, 2024
1 parent fb4dc33 commit 0d18e37
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/giant-windows-nail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@floating-ui/dom": patch
---

refactor: avoid $ appearing in rects dimensions
3 changes: 2 additions & 1 deletion packages/dom/src/platform/getDimensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ import type {Dimensions} from '@floating-ui/core';
import {getCssDimensions} from '../utils/getCssDimensions';

export function getDimensions(element: Element): Dimensions {
return getCssDimensions(element);
const {width, height} = getCssDimensions(element);
return {width, height};
}

0 comments on commit 0d18e37

Please sign in to comment.