mirror of
https://github.com/movie-web/movie-web.git
synced 2025-09-13 18:13:24 +00:00
35 lines
955 B
TypeScript
35 lines
955 B
TypeScript
import classNames from "classnames";
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
import { Icon, Icons } from "@/components/Icon";
|
|
|
|
export function BrandPill(props: {
|
|
clickable?: boolean;
|
|
hideTextOnMobile?: boolean;
|
|
backgroundClass?: string;
|
|
}) {
|
|
const { t } = useTranslation();
|
|
|
|
return (
|
|
<div
|
|
className={classNames(
|
|
"flex items-center space-x-2 rounded-full px-4 py-2 text-type-logo",
|
|
props.backgroundClass ?? "bg-pill-background bg-opacity-50",
|
|
props.clickable
|
|
? "transition-[transform,background-color] hover:scale-105 hover:bg-pill-backgroundHover hover:text-type-logo active:scale-95"
|
|
: "",
|
|
)}
|
|
>
|
|
<Icon className="text-xl" icon={Icons.MOVIE_WEB} />
|
|
<span
|
|
className={[
|
|
"font-semibold text-white",
|
|
props.hideTextOnMobile ? "hidden sm:block" : "",
|
|
].join(" ")}
|
|
>
|
|
{t("global.name")}
|
|
</span>
|
|
</div>
|
|
);
|
|
}
|