import { ActionLinkProps } from './types'; const ActionLink = ({ children, describedby, href, linkComponent, onclick }: ActionLinkProps) => { const CLASSNAME = 'ds_link'; function processChildren(children: React.ReactNode) { if (linkComponent) { return linkComponent({ className: CLASSNAME, href, children, onClick: onclick, 'aria-describedby': describedby }); } else if (href) { return {children}; } else { return ; } } return ( processChildren(children) ); }; ActionLink.displayName = 'ActionLink'; export default ActionLink;