Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC][UI]: Fix issues on light/dark theme #3380

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

yanCode
Copy link
Contributor

@yanCode yanCode commented Nov 23, 2024

This PR fixes: #3379
I used "next-themes": "^0.4.3", https://ui.shadcn.com/docs/dark-mode/next to handle the shifting of light/dark themes.

with next-themes, it can reduce much boilplate code to handle the changing of light/dark mode, and most importantly, it can easily get current theme, which will be used to control the theme of the code block prism-react-renderer

in which it uses github theme for the code block by using import lightTheme from 'prism-react-renderer/themes/github', when in light mode.

as an example:

image

also, after the fix. the scroll bar in dark mode looks better :

image

Copy link

vercel bot commented Nov 23, 2024

@yanCode is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DOC][UI] display issues in light/dark mode
1 participant