Skip to content

Commit

Permalink
feat: Add RTL support for sidepanel settings header
Browse files Browse the repository at this point in the history
  • Loading branch information
n4ze3m committed Dec 29, 2024
1 parent db3a80c commit efb49d8
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/components/Sidepanel/Settings/header.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
import { ChevronLeft } from "lucide-react"
import { ChevronLeft, ChevronRight } from "lucide-react"
import { useTranslation } from "react-i18next"
import { Link } from "react-router-dom"
import logoImage from "~/assets/icon.png"

export const SidepanelSettingsHeader = () => {
const { t } = useTranslation("common")
const { t , i18n} = useTranslation("common")
const isRTL = i18n?.dir() === "rtl"

return (
<div className="flex px-3 justify-start gap-3 bg-white dark:bg-[#171717] border-b border-gray-300 dark:border-gray-700 py-4 items-center">
<Link to="/">
<ChevronLeft className="h-5 w-5 text-gray-500 dark:text-gray-400" />
{
isRTL ? (
<ChevronRight className="h-5 w-5 text-gray-500" />
) : (
<ChevronLeft className="h-5 w-5 text-gray-500" />
)
}
</Link>
<div className="focus:outline-none focus-visible:ring-2 focus-visible:ring-pink-700 flex items-center dark:text-white">
<img className="h-6 w-auto" src={logoImage} alt={t("pageAssist")} />
Expand Down

0 comments on commit efb49d8

Please sign in to comment.