Closed yehezkielgunawan closed 2 years ago
Only the links right?
Oh sorry, I forgot to close this issue. Finally, I found a way to resolve this using React-Notion-X
it would be great if you could share your solution 🙂, because I m using your same stack
I know, but so far that's what I've tried and I didn't find a concrete solution for that, LOL. So for now I use another equivalent library to resolve my issue, LOL.
FWIW I was able to do this with styled components and twin.macro
import React from 'react';
import PropTypes from 'prop-types';
import { css, styled } from 'twin.macro';
const styles = css`
@media (prefers-color-scheme: dark) {
.notion, .notion-text, .notion-page-link {
color: white;
background-color: #1e1e1e;
}
}
}`;
const StyledDiv = styled.div(() => [styles]);
...
return (
<StyledDiv>
<NotionRenderer blockMap={recordMap.data} />
</StyedDiv>
);
Hi, I've just implemented React Notion to my personal site. But there's a problem when I want to implement it with dark mode. Some text doesn't change its color. It happens when I want to render the article from my notion.
I made my website using Next JS, Chakra UI, and React Notion.
Here's my snippet.
Here are some texts when it's in light mode.![image](https://user-images.githubusercontent.com/48091142/135211029-4ab3687e-cd67-48ad-af45-171f2417c52d.png)
Here are some texts when it's in the dark mode,![image](https://user-images.githubusercontent.com/48091142/135211207-6003979d-be98-470c-882f-dd48779d99e5.png)
The live version of my article can be accessed at https://yehezgun.com/articles/post/cerita-di-balik-yehezgun-com, you can check it here.
Is this happens because of my code or from the Notion Renderer itself? Thank you in advance.