saleor-dashboard/src/components/Sidebar/legacy/SidebarLink.tsx
Krzysztof Żuraw 373c9e9ac3
Add sidebar feature flag (#3019)
Co-authored-by: andrzejewsky <vox3r69@gmail.com>
2023-01-23 12:16:02 +01:00

13 lines
364 B
TypeScript

import React from "react";
import { Link, LinkProps } from "react-router-dom";
interface SidebarLinkProps extends Omit<LinkProps, "to"> {
href?: string;
}
export const SidebarLink = React.forwardRef<
HTMLAnchorElement,
SidebarLinkProps
>(({ href, ...props }, ref) => <Link to={href} {...props} innerRef={ref} />);
SidebarLink.displayName = "SidebarLink";