@patternfly/react-core
Version:
This library provides a set of common React components for use with the PatternFly reference implementation.
12 lines (9 loc) • 294 B
text/typescript
// @ts-nocheck
import { Placement } from '../enums';
const hash = { start: 'end', end: 'start' };
/**
* @param placement
*/
export default function getOppositeVariationPlacement(placement: Placement): Placement {
return placement.replace(/start|end/g, matched => hash[matched]) as any;
}