// Where an option list opens, from the box it would take if it hung from the // left of its trigger. Kept apart from the component so a test reaches it // without a DOM. /** Whether a list whose left-hung box ends at `right` needs to hang from the * right of its trigger instead, to stay inside a window `viewportWidth` wide. */ export function hangsFromEnd(right: number, viewportWidth: number): boolean { return right > viewportWidth; }