mirror of
https://github.com/formbricks/formbricks.git
synced 2025-12-30 18:30:32 -06:00
style: tweak environment switch (#3102)
This commit is contained in:
committed by
GitHub
parent
954c435404
commit
86bf2accc9
@@ -40,7 +40,7 @@ export const EnvironmentSwitch = ({ environment, environments }: EnvironmentSwit
|
||||
<Label
|
||||
htmlFor="development-mode"
|
||||
className={cn("hover:cursor-pointer", isEnvSwitchChecked && "text-orange-800")}>
|
||||
Test mode
|
||||
Dev Env
|
||||
</Label>
|
||||
<Switch
|
||||
className="focus:ring-orange-800 data-[state=checked]:bg-orange-800"
|
||||
|
||||
@@ -36,6 +36,7 @@ export const TopControlBar = ({
|
||||
environments={environments}
|
||||
isFormbricksCloud={IS_FORMBRICKS_CLOUD}
|
||||
membershipRole={membershipRole}
|
||||
currentProductChannel={currentProductChannel}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,6 +6,7 @@ import { useRouter } from "next/navigation";
|
||||
import formbricks from "@formbricks/js/app";
|
||||
import { TEnvironment } from "@formbricks/types/environment";
|
||||
import { TMembershipRole } from "@formbricks/types/memberships";
|
||||
import { TProductConfigChannel } from "@formbricks/types/product";
|
||||
import { Button } from "@formbricks/ui/Button";
|
||||
|
||||
interface TopControlButtonsProps {
|
||||
@@ -13,6 +14,7 @@ interface TopControlButtonsProps {
|
||||
environments: TEnvironment[];
|
||||
isFormbricksCloud: boolean;
|
||||
membershipRole?: TMembershipRole;
|
||||
currentProductChannel: TProductConfigChannel;
|
||||
}
|
||||
|
||||
export const TopControlButtons = ({
|
||||
@@ -20,11 +22,13 @@ export const TopControlButtons = ({
|
||||
environments,
|
||||
isFormbricksCloud,
|
||||
membershipRole,
|
||||
currentProductChannel,
|
||||
}: TopControlButtonsProps) => {
|
||||
const router = useRouter();
|
||||
const showEnvironmentSwitch = currentProductChannel !== "link";
|
||||
return (
|
||||
<div className="z-50 flex items-center space-x-2">
|
||||
<EnvironmentSwitch environment={environment} environments={environments} />
|
||||
{showEnvironmentSwitch && <EnvironmentSwitch environment={environment} environments={environments} />}
|
||||
{isFormbricksCloud && (
|
||||
<Button
|
||||
variant="minimal"
|
||||
|
||||
Reference in New Issue
Block a user