Skip to content

Commit ed32dc2

Browse files
committed
fix: fix
1 parent 78dff6f commit ed32dc2

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/components/TranslationBanner.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import type { Lang } from "@/lib/types"
99
import { Button } from "@/components/ui/buttons/Button"
1010
import { Flex } from "@/components/ui/flex"
1111

12+
import { cn } from "@/lib/utils/cn"
1213
import { isLangRightToLeft } from "@/lib/utils/translations"
1314

1415
import Emoji from "./Emoji"
@@ -41,11 +42,15 @@ const TranslationBanner = ({
4142
? "translation-banner-body-new"
4243
: "translation-banner-body-update"
4344

44-
if (!isOpen) return null
45-
4645
return (
47-
<aside className="fixed bottom-0 end-0 z-50 md:bottom-8 md:end-8" dir={dir}>
48-
<div className="bg-info-banner relative max-h-full max-w-full p-4 text-neutral-900 shadow-md md:max-w-[600px] md:rounded-sm">
46+
<aside
47+
className={cn(
48+
"fixed bottom-0 end-0 z-popover md:bottom-8 md:end-8",
49+
isOpen ? "block" : "hidden"
50+
)}
51+
dir={dir}
52+
>
53+
<div className="bg-infoBanner relative max-h-full max-w-full p-4 text-neutral-900 shadow-md md:max-w-[600px] md:rounded-sm">
4954
<Flex className="m-4 mt-10 flex-col sm:mt-4">
5055
<Flex className="mb-4 flex-col-reverse items-start sm:flex-row sm:items-center">
5156
<h3 className="my-0 text-2xl font-bold leading-none">
@@ -59,7 +64,7 @@ const TranslationBanner = ({
5964
<p>{t(bodyTextId)}</p>
6065
<Flex className="flex-col items-start sm:flex-row sm:items-center">
6166
<div>
62-
<Button asChild variant="solid">
67+
<Button asChild variant="link">
6368
<Link href="/contributing/translation-program/">
6469
{t("translation-banner-button-translate-page")}
6570
</Link>

0 commit comments

Comments
 (0)