import React, { ElementType, FunctionComponent, LinkHTMLAttributes } from 'react'; import getClassName from '../../helpers/getClassName'; import classNames from '../../lib/classNames'; import usePlatform from '../../hooks/usePlatform'; import { HasRootRef } from '../../types'; export interface LinkProps extends LinkHTMLAttributes, HasRootRef { Component?: ElementType; } const Link: FunctionComponent = ({ children, className, Component, getRootRef, ...restProps }: LinkProps) => { const platform = usePlatform(); const baseClassName = getClassName('Link', platform); return ( {children} ); }; Link.defaultProps = { Component: 'a', }; export default Link;