mirror of https://github.com/sylv/micro.git
14 lines
327 B
TypeScript
14 lines
327 B
TypeScript
import { forwardRef, Fragment, type HTMLAttributes } from 'react';
|
|
|
|
export interface LinkProps extends HTMLAttributes<HTMLAnchorElement> {
|
|
href: string;
|
|
}
|
|
|
|
export const Link = forwardRef<HTMLAnchorElement, LinkProps>(({ children, ...rest }, ref) => {
|
|
return (
|
|
<a {...rest} ref={ref}>
|
|
{children}
|
|
</a>
|
|
);
|
|
});
|