mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-27 11:42:52 +00:00
* feat(app): modernize compact headers and sidebar affordances Use a shared island header with quick tab creation and keep sheet footers inside their visible layout. Opt sidebar rows into touch sizing without changing global appearance settings. * test(app): match darker light-theme workspace selection * test(app): align plugin journeys with compact header
29 lines
665 B
TypeScript
29 lines
665 B
TypeScript
export interface CompactSheetSafeAreaPaddingInput {
|
|
isCompact: boolean;
|
|
isKeyboardVisible: boolean;
|
|
hasFooter: boolean;
|
|
safeAreaBottom: number;
|
|
}
|
|
|
|
export interface CompactSheetSafeAreaPadding {
|
|
contentPaddingBottom?: number;
|
|
footerPaddingBottom?: number;
|
|
}
|
|
|
|
export function getCompactSheetSafeAreaPadding({
|
|
isCompact,
|
|
isKeyboardVisible,
|
|
hasFooter,
|
|
safeAreaBottom,
|
|
}: CompactSheetSafeAreaPaddingInput): CompactSheetSafeAreaPadding {
|
|
if (!isCompact || isKeyboardVisible || safeAreaBottom <= 0) {
|
|
return {};
|
|
}
|
|
|
|
if (hasFooter) {
|
|
return { footerPaddingBottom: safeAreaBottom };
|
|
}
|
|
|
|
return { contentPaddingBottom: safeAreaBottom };
|
|
}
|