Open History to see the last commit
1export const COMPOSER_FOOTER_COMPACT_BREAKPOINT_PX = 620;
2export const COMPOSER_FOOTER_WIDE_ACTIONS_COMPACT_BREAKPOINT_PX = 780;
3
4export function shouldUseCompactComposerFooter(
5 width: number | null,
6 options?: { hasWideActions?: boolean },
7): boolean {
8 const breakpoint = options?.hasWideActions
9 ? COMPOSER_FOOTER_WIDE_ACTIONS_COMPACT_BREAKPOINT_PX
10 : COMPOSER_FOOTER_COMPACT_BREAKPOINT_PX;
11 return width !== null && width < breakpoint;
12}
13
14export function shouldUseCompactComposerPrimaryActions(
15 width: number | null,
16 options?: { hasWideActions?: boolean },
17): boolean {
18 if (!options?.hasWideActions) {
19 return false;
20 }
21 return width !== null && width < COMPOSER_FOOTER_WIDE_ACTIONS_COMPACT_BREAKPOINT_PX;
22}