Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

composerFooterLayout.ts

12 lines453 Bytes

1export const COMPOSER_FOOTER_COMPACT_BREAKPOINT_PX = 620;
2export const COMPOSER_FOOTER_WIDE_ACTIONS_COMPACT_BREAKPOINT_PX = 720;
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;