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

export interface ButtonLinkProps extends ButtonLinkBaseProps {}

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