jobiqo-cl
Version:
[](https://circleci.com/gh/jobiqo/jobiqo-cl)
34 lines (30 loc) • 1.15 kB
JavaScript
import { __rest } from '../../../../../node_modules/tslib/tslib.es6.js';
import { createElement } from 'react';
import styled from 'styled-components';
/**
* @file index.tsx
*
* @fileoverview Renders a single facet link in the form of a span.
*/
const StyledFacetLink = styled.span `
cursor: pointer;
text-transform: ${props => props.theme.navigation.links.textTransform};
text-decoration: ${props => props.theme.navigation.links.textDecoration};
color: ${props => props.theme.colors.primary};
margin-right: ${props => props.theme.navigation.links.marginRight};
font-size: ${props => props.theme.navigation.links.fontSize};
&.is-active {
color: ${props => props.theme.navigation.links.activeColor};
}
${props => props.selected
? `font-style:italic; color:${props.theme.colors.gray9}`
: null};
`;
/**
* Styles a facet link as used in the facet listing.
*/
const FacetLinkItem = (_a) => {
var { children, selected } = _a, props = __rest(_a, ["children", "selected"]);
return (createElement(StyledFacetLink, Object.assign({ selected: selected }, props), children));
};
export { FacetLinkItem };