mirror of
https://github.com/formbricks/formbricks.git
synced 2026-02-05 02:58:36 -06:00
19 lines
542 B
TypeScript
19 lines
542 B
TypeScript
import { TPlacement } from "@formbricks/types/common";
|
|
|
|
export const getPlacementStyle = (placement: TPlacement) => {
|
|
switch (placement) {
|
|
case "bottomRight":
|
|
return "bottom-3 sm:right-3";
|
|
case "topRight":
|
|
return "sm:top-3 sm:right-3 bottom-3";
|
|
case "topLeft":
|
|
return "sm:top-3 sm:left-3 bottom-3";
|
|
case "bottomLeft":
|
|
return "bottom-3 sm:left-3";
|
|
case "center":
|
|
return "top-1/2 left-1/2 transform !-translate-x-1/2 -translate-y-1/2";
|
|
default:
|
|
return "bottom-3 sm:right-3";
|
|
}
|
|
};
|