mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 15:01:23 +08:00
- updating README file with all the deep theme variables supported - updating `HeadingLink` component to support html strings for `brand`. So that `image` can be used for `brand` - placing `props` to last in `chevronRight` component, so that it overrides the theme props passed
34 lines
748 B
JavaScript
34 lines
748 B
JavaScript
import PropTypes from 'prop-types';
|
|
import styled from '@emotion/styled';
|
|
import RoutedLink from './RoutedLink';
|
|
|
|
const MenuLink = styled(RoutedLink, { rootEl: 'a' })(
|
|
({ theme }) => ({
|
|
display: 'block',
|
|
color: theme.dimmedTextColor,
|
|
textDecoration: 'none',
|
|
fontSize: '13px',
|
|
lineHeight: '16px',
|
|
padding: '1px 5px 4px',
|
|
marginLeft: '5px',
|
|
position: 'relative',
|
|
zIndex: 1,
|
|
...theme.menuLink,
|
|
}),
|
|
({ theme, active }) =>
|
|
active
|
|
? {
|
|
color: 'inherit',
|
|
fontWeight: 'bold',
|
|
backgroundColor: 'rgba(0,0,0,0.07)',
|
|
zIndex: 0,
|
|
...theme.activeMenuLink,
|
|
}
|
|
: {}
|
|
);
|
|
MenuLink.propTypes = {
|
|
active: PropTypes.bool,
|
|
};
|
|
|
|
export default MenuLink;
|