UNPKG

@atlaskit/navigation-system

Version:

The latest navigation system for Atlassian apps.

13 lines • 570 B
/** * Returns the physical side the panel grows towards when the splitter is dragged away from it. * * `position: 'end'` grows towards the inline-end, which is the right in left-to-right languages, and * `position: 'start'` grows towards the inline-start. */ export function getPanelGrowthSide(_ref) { var position = _ref.position, textDirection = _ref.textDirection; var isGrowingTowardsInlineEnd = position === 'end'; var isInlineEndOnTheRight = textDirection === 'ltr'; return isGrowingTowardsInlineEnd === isInlineEndOnTheRight ? 'right' : 'left'; }