micro/packages/web/src/components/link.tsx

15 lines
326 B
TypeScript

import type { ComponentProps} from 'react';
import { forwardRef } from 'react';
export interface LinkProps extends ComponentProps<'a'> {
href: string;
}
export const Link = forwardRef<HTMLAnchorElement, LinkProps>(({ children, ...rest }, ref) => {
return (
<a {...rest} ref={ref}>
{children}
</a>
);
});