mirror of
https://github.com/lukevella/rallly.git
synced 2025-08-06 09:59:00 +02:00
💄 Fix pro badge shrinking
This commit is contained in:
parent
75138ff4c9
commit
678a14d4c9
1 changed files with 5 additions and 18 deletions
|
@ -8,14 +8,7 @@ import {
|
||||||
} from "@rallly/ui/card";
|
} from "@rallly/ui/card";
|
||||||
import { FormField } from "@rallly/ui/form";
|
import { FormField } from "@rallly/ui/form";
|
||||||
import { Switch } from "@rallly/ui/switch";
|
import { Switch } from "@rallly/ui/switch";
|
||||||
import { Tooltip, TooltipContent, TooltipTrigger } from "@rallly/ui/tooltip";
|
import { AtSignIcon, EyeIcon, MessageCircleIcon, VoteIcon } from "lucide-react";
|
||||||
import {
|
|
||||||
AtSignIcon,
|
|
||||||
EyeIcon,
|
|
||||||
InfoIcon,
|
|
||||||
MessageCircleIcon,
|
|
||||||
VoteIcon,
|
|
||||||
} from "lucide-react";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useFormContext } from "react-hook-form";
|
import { useFormContext } from "react-hook-form";
|
||||||
import { Trans } from "react-i18next";
|
import { Trans } from "react-i18next";
|
||||||
|
@ -37,23 +30,17 @@ const SettingContent = ({ children }: React.PropsWithChildren) => {
|
||||||
const SettingTitle = ({
|
const SettingTitle = ({
|
||||||
children,
|
children,
|
||||||
pro,
|
pro,
|
||||||
hint,
|
|
||||||
}: React.PropsWithChildren<{
|
}: React.PropsWithChildren<{
|
||||||
pro?: boolean;
|
pro?: boolean;
|
||||||
htmlFor?: string;
|
htmlFor?: string;
|
||||||
hint?: React.ReactNode;
|
|
||||||
}>) => {
|
}>) => {
|
||||||
return (
|
return (
|
||||||
<div className="flex min-w-0 items-center gap-x-2.5">
|
<div className="flex min-w-0 items-center gap-x-2.5">
|
||||||
<div className="text-sm font-medium">{children}</div>
|
<div className="text-sm font-medium">{children}</div>
|
||||||
{pro ? <ProFeatureBadge /> : null}
|
{pro ? (
|
||||||
{hint ? (
|
<div>
|
||||||
<Tooltip>
|
<ProFeatureBadge />
|
||||||
<TooltipTrigger>
|
</div>
|
||||||
<InfoIcon className="text-muted-foreground size-4" />
|
|
||||||
</TooltipTrigger>
|
|
||||||
<TooltipContent>{hint}</TooltipContent>
|
|
||||||
</Tooltip>
|
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue