export * from '@digigov/react-core/BackLinkBase';
import React from 'react';
import {
  BackLinkBase,
  BackLinkBaseProps,
} from '@digigov/react-core/BackLinkBase';
import { Link } from '@digigov/ui/navigation/Link';

export interface BackLinkProps extends BackLinkBaseProps {}

export const BackLink = React.forwardRef<HTMLAnchorElement, BackLinkProps>(
  function BackLink({ children, ...props }, ref) {
    return (
      <BackLinkBase as={Link} ref={ref} {...props}>
        {children}
      </BackLinkBase>
    );
  }
);
export default BackLink;
