/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* @emails react-core
*/
'use strict';
import Link from 'gatsby-link';
import React from 'react';
import ExternalLinkSvg from 'templates/components/ExternalLinkSvg';
import slugify from 'utils/slugify';
import {colors, media} from 'theme';
const createLinkBlog = ({isActive, item, section}) => {
return (
{isActive && }
{item.title}
);
};
const createLinkCommunity = ({isActive, item, section}) => {
if (item.href) {
return (
{item.title}
);
}
return createLinkDocs({
isActive,
item,
section,
});
};
const createLinkDocs = ({isActive, item, section}) => {
return (
{isActive && }
{item.title}
);
};
const createLinkTutorial = ({isActive, item, onLinkClick, section}) => {
return (
{isActive && }
{item.title}
);
};
const activeLinkCss = {
fontWeight: 700,
};
const activeLinkBefore = {
width: 4,
height: 25,
borderLeft: `4px solid ${colors.brand}`,
paddingLeft: 16,
position: 'absolute',
left: 0,
marginTop: -3,
[media.greaterThan('largerSidebar')]: {
left: 15,
},
};
const linkCss = {
color: colors.text,
display: 'inline-block',
borderBottom: '1px solid transparent',
transition: 'border 0.2s ease',
marginTop: 5,
'&:hover': {
color: colors.subtle,
},
};
export {
createLinkBlog,
createLinkCommunity,
createLinkDocs,
createLinkTutorial,
};