1234567891011121314151617181920212223242526272829303132333435363738394041 |
- import ExternalLink from 'sentry/components/links/externalLink';
- import Link from 'sentry/components/links/link';
- type Props = {
-
- children: React.ReactNode;
-
- href?: string;
-
- onClick?: () => void;
-
- openInNewTab?: boolean;
-
- style?: React.CSSProperties;
-
- to?: string;
- };
- const SidebarMenuItemLink = ({to, href, ...props}: Props) => {
- if (href) {
- return <ExternalLink href={href} {...props} />;
- }
- if (to) {
- return <Link to={to} {...props} />;
- }
- return <div tabIndex={0} {...props} />;
- };
- export default SidebarMenuItemLink;
|