- add shared footer layout breakpoint helper with tests - switch chat composer footer to compact menu when width is constrained - preserve plan sidebar toggle behavior while consolidating footer actions
13 lines
453 B
TypeScript
13 lines
453 B
TypeScript
export const COMPOSER_FOOTER_COMPACT_BREAKPOINT_PX = 620;
|
|
export const COMPOSER_FOOTER_WIDE_ACTIONS_COMPACT_BREAKPOINT_PX = 720;
|
|
|
|
export function shouldUseCompactComposerFooter(
|
|
width: number | null,
|
|
options?: { hasWideActions?: boolean },
|
|
): boolean {
|
|
const breakpoint = options?.hasWideActions
|
|
? COMPOSER_FOOTER_WIDE_ACTIONS_COMPACT_BREAKPOINT_PX
|
|
: COMPOSER_FOOTER_COMPACT_BREAKPOINT_PX;
|
|
return width !== null && width < breakpoint;
|
|
}
|