Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React from 'react';
import PropTypes from 'prop-types';
import styled from '@emotion/styled';
import { Explorer, Router } from '@storybook/components';
const strip = (href, viewMode = 'components') => href.replace('#!', `/${viewMode}/`);
const StyledLink = React.memo(
styled(Router.Link)({
display: 'flex',
alignItems: 'center',
color: 'inherit',
textDecoration: 'none',
})
);
StyledLink.displayName = 'StyledLink';
const LeafLink = React.memo(({ href, children, ...rest }) => (
{({ viewMode }) => (
{children}
)}
));