feat: add paper-style mobile navigation
This commit is contained in:
@@ -190,6 +190,10 @@ export async function performTrashMutation(
|
||||
return { mutated: true, refreshed: await refresh() }
|
||||
}
|
||||
|
||||
export function fabBottomReserved(safeAreaBottom = 0, navigationHeight = 64, gap = 12) {
|
||||
return navigationHeight + Math.max(0, safeAreaBottom) + gap
|
||||
}
|
||||
|
||||
export function clampFabPosition(x: number, y: number, viewportWidth: number, viewportHeight: number, size = 56, margin = 14, bottomReserved = 84) {
|
||||
return {
|
||||
x: Math.min(Math.max(x, margin), Math.max(margin, viewportWidth - size - margin)),
|
||||
|
||||
Reference in New Issue
Block a user