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

设置 theme 成dark后,只是文字颜色变化了,背景没变化 #8

Open
mikeguo99 opened this issue Nov 20, 2022 · 1 comment

Comments

@mikeguo99
Copy link

而且在初始化只有再修改 theme,就文字颜色也没有变化。

export default function ReactCusdisWrapper({ articleId, title }: Props) {
  const { themeName, isDarkMode } = useTheme();
  return (
    <>
      <div id="react-cusdis-wrapper">
        <ReactCusdis
          attrs={{
            host: "https://......",
            appId: "......",
            pageId: "/.../" + ...,
            pageTitle: title,
            pageUrl: "https://.../" + ...,
            theme: themeName,
          }}
        />
      </div>
    </>
  );
}
@yakiisama
Copy link

yakiisama commented Mar 17, 2023

You can use official api to change it manually like this

window.CUSDIS.setTheme('dark')

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

No branches or pull requests

2 participants