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

如何自定义组件布局 #545

Open
aafnnp opened this issue May 14, 2023 · 2 comments
Open

如何自定义组件布局 #545

aafnnp opened this issue May 14, 2023 · 2 comments

Comments

@aafnnp
Copy link

aafnnp commented May 14, 2023

比如:
组件依赖 ThemeProvider,并不希望在每个 preview 或者 md 文件引入 ThemeProvider,希望能定义 Layout,有什么方法吗?

@luhc228
Copy link
Member

luhc228 commented May 15, 2023

可以新建了 Layout.js 编写组件,然后在 md 中引入:
image

@aafnnp
Copy link
Author

aafnnp commented May 15, 2023

可以新建了 Layout.js 编写组件,然后在 md 中引入: image

有没有统一默认导入的,这样其实挺繁琐的,每个代码块都需要引入

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