import { PropsWithChildren, AnchorHTMLAttributes } from 'react';
import { UISrefProps, useSref } from '@uirouter/react';
interface Props extends AnchorHTMLAttributes {
'data-cy': string;
}
export function Link({
children,
'data-cy': dataCy,
to,
params,
options,
title,
...props
}: PropsWithChildren & UISrefProps) {
const { onClick, href } = useSref(to, params, options);
return (
// eslint-disable-next-line react/jsx-props-no-spreading
{children}
);
}