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

markdown 组件的暗色主题怎么设置[Question] #159

Open
jiehwa opened this issue Feb 7, 2024 · 1 comment
Open

markdown 组件的暗色主题怎么设置[Question] #159

jiehwa opened this issue Feb 7, 2024 · 1 comment

Comments

@jiehwa
Copy link

jiehwa commented Feb 7, 2024

🧐 问题描述 | Proposed Solution

如标题,使用了如下代码,设置
import { Markdown } from '@ant-design/pro-editor';

<ConfigProvider
        theme={{
          // 1. 单独使用暗色算法
          algorithm: theme.darkAlgorithm,
          // 2. 组合使用暗色算法与紧凑算法
          // algorithm: [theme.darkAlgorithm, theme.compactAlgorithm],
        }}
      >
        <p> 测试antd主题</p>
        <Title>h1. Ant Design</Title>
        <Button>antd主题按钮</Button>
        <Markdown>{`# This is an H1
        ## This is an H2
        ### This is an H3
        #### This is an H4
        ##### This is an H5`}
                </Markdown>
      </ConfigProvider>

antd的主题设置成了暗色背景,被 antd 组件包裹的 Button 和 Title 是变成了暗色的主题,但是 markdown 并没有变过来,markdown 如果想要也变成暗色,该如何设置?

📝 补充信息 | Additional Information

No response

@ONLY-yours
Copy link
Collaborator

ONLY-yours commented Feb 19, 2024

https://ant-design.github.io/antd-style/zh-CN/guide/switch-theme

参考这个进行主题切换,文档我稍后会补充上来

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