I'm attempting to utilize the emotion
library.
Here is my JavaScript code:
import React from 'react';
import { css } from '@emotion/core';
export const Menu = () => (
<>
<nav
css={css`
position: absolute;
color: white;
`}
>
<h1
css={css`
color: white;
`}
>
Title
</h1>
<ul>
<li>Projects</li>
<li>Blog</li>
<li>About</li>
<li>Contact</li>
</ul>
</nav>
</>;
);
export default Menu;
Upon inspecting the element, this message appears instead:
You have attempted to stringify an object returned from the css
function. It should not be used directly (e.g. as a value of the className
prop), but rather passed to emotion so it can handle it (e.g. as a value of the css
prop).