8 lines
207 B
Text
8 lines
207 B
Text
// @flow
|
|
import type { Placement } from '../enums';
|
|
|
|
export default function getMainAxisFromPlacement(
|
|
placement: Placement
|
|
): 'x' | 'y' {
|
|
return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
|
|
}
|