import type { FC } from '../../lib/teact/teact'; import React from '../../lib/teact/teact'; import buildClassName from '../../util/buildClassName'; import useLastCallback from '../../hooks/useLastCallback'; import styles from './Link.module.scss'; type OwnProps = { children: React.ReactNode; className?: string; isRtl?: boolean; isPrimary?: boolean; onClick?: (e: React.MouseEvent) => void; }; const Link: FC = ({ children, isPrimary, className, isRtl, onClick, }) => { const handleClick = useLastCallback((e: React.MouseEvent) => { e.preventDefault(); onClick!(e); }); return ( {children} ); }; export default Link;