UNPKG

@coreui/vue

Version:

UI Components Library for Vue.js

19 lines (16 loc) 427 B
import { Placement } from '@popperjs/core' import isRTL from './isRTL' const getRTLPlacement = (placement: string, element: HTMLDivElement | null): Placement => { switch (placement) { case 'right': { return isRTL(element) ? 'left' : 'right' } case 'left': { return isRTL(element) ? 'right' : 'left' } default: { return placement as Placement } } } export default getRTLPlacement