Files
web-menu-react-version-/src/components/InfoButton/InfoButton.tsx
2025-10-04 18:22:24 +03:00

51 lines
1.2 KiB
TypeScript

import { Card } from "antd";
import BackIcon from "components/Icons/BackIcon";
import NextIcon from "components/Icons/NextIcon";
import { useAppSelector } from "redux/hooks";
import ProTitle from "../ProTitle";
import styles from "./InfoButton.module.css";
export const InfoButton = ({
icon,
title,
onInfoClick,
}: {
icon: React.ReactNode;
title: string;
onInfoClick: () => void;
}) => {
const { isRTL } = useAppSelector((state) => state.locale);
return (
<Card className={styles.homeServiceCard} onClick={onInfoClick}>
<div
style={{
display: "flex",
flexDirection: "row",
justifyContent: "space-between",
marginTop: 1,
}}
>
<div style={{ display: "flex", flexDirection: "row", gap: 10 }}>
{icon}
<ProTitle
level={5}
style={{
marginTop: -2,
fontSize: "1rem",
color: "rgba(95, 108, 123, 1)",
}}
>
{title}
</ProTitle>
</div>
{isRTL ? (
<BackIcon className={styles.infoIcon} />
) : (
<NextIcon className={styles.infoIcon} />
)}
</div>
</Card>
);
};