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

feat: customize native scrollbar and simplebar styles #123

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sealye09
Copy link
Contributor

@sealye09 sealye09 commented Jan 10, 2025

before

native-before
simplebar-before

after

native-after
simplebar-after

Copy link

vercel bot commented Jan 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
slash-admin ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 10, 2025 7:28am

Copy link

@joaoflaviosantos joaoflaviosantos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @sealye09!

Adjust here:

body.dark {
  --c-bg: transparent;
  --c-scrollbar: #555;
  --c-scrollbar-hover: #888;
}

Copy link

@joaoflaviosantos joaoflaviosantos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello again @sealye09!

Add it to 'src\theme\antd\index.tsx':

  useEffect(() => {
    if (themeMode === ThemeMode.Dark) {
      document.body.classList.add('dark');
    } else {
      document.body.classList.remove('dark');
    }
  }, [themeMode]);

@sealye09
Copy link
Contributor Author

Hello again @sealye09!

Add it to 'src\theme\antd\index.tsx':

  useEffect(() => {
    if (themeMode === ThemeMode.Dark) {
      document.body.classList.add('dark');
    } else {
      document.body.classList.remove('dark');
    }
  }, [themeMode]);

already have that logic in ThemeProvider

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.

2 participants