Skip to content

Commit

Permalink
fix styled component errors. Site now builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
jameshadfield committed Jan 14, 2020
1 parent 77e4ee7 commit 2c5915a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
5 changes: 4 additions & 1 deletion static-site/.babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"plugins": ["lodash"],
"plugins": [
"lodash",
"babel-plugin-styled-components"
],
"presets": [
[
"babel-preset-gatsby"
Expand Down
8 changes: 6 additions & 2 deletions static-site/src/components/nav-bar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,14 @@ const NavLogoCharacter = styled.span`
font-size: 20px;
font-weight: 400;
cursor: pointer;
color: ${(props) => props.theme.titleColors[props.colorIndex]};
color: ${(props) => {
// TODO -- the theme is not available as a prop for some reason
// return props.theme.titleColors[props.colorIndex];
return "black";
}};
`;

const NavLink = styled(Link)`
const NavLink = styled((props) => <Link {...props} />)`
padding-left: ${(props) => props.minified ? '6px' : '12px'};
padding-right: ${(props) => props.minified ? '6px' : '12px'};
padding-top: 20px;
Expand Down

0 comments on commit 2c5915a

Please sign in to comment.