fix(web): minor album card issues (#7975)

* fix(web): minor album card issues

* fix album grid gap
This commit is contained in:
Michel Heusschen 2024-03-15 17:03:54 +01:00 committed by GitHub
parent 0f79c4ff46
commit cfb14ca80b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 42 additions and 71 deletions

View file

@ -1,6 +1,8 @@
export type Align = 'middle' | 'top-left' | 'top-right';
export const getContextMenuPosition = (event: MouseEvent, align: Align = 'middle') => {
export type ContextMenuPosition = { x: number; y: number };
export const getContextMenuPosition = (event: MouseEvent, align: Align = 'middle'): ContextMenuPosition => {
const { x, y, currentTarget, target } = event;
const box = ((currentTarget || target) as HTMLElement)?.getBoundingClientRect();
if (box) {