mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-06 05:40:02 -06:00
* made modal component responsive * added tab switch * added mobile preview mode for surveys * did some refactors * did some refactors * added type defs * ran pnpm format * removed an unused comment * fixed variable name typo * fixed UI bugs and added mobile mockup to link surveys * restored changes from fix long description PR * fixed scroll to top issue and toggle hide bug * fixed minor animation bug * fixed placement issue * re-embed restart button, make phone preview more responsive --------- Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
19 lines
544 B
TypeScript
19 lines
544 B
TypeScript
import { PlacementType } from "@formbricks/types/js";
|
|
|
|
export const getPlacementStyle = (placement: PlacementType) => {
|
|
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";
|
|
}
|
|
};
|