Closed JaylanChen closed 1 year ago
用 css 隐藏一下就好了吧?
推荐方案:创建 .dumi/theme/slots/PreviewerActions.tsx
,包裹默认的组件并传递需要的 disabledActions
参数,相当于做一次柯里化
`import DumiPreviewerActions from 'dumi/theme-default/slots/PreviewerActions'; import React from 'react';
const PreviewerActions = (props) => { const config = { ...props, disabledActions: ['CSB', 'CODEPEN', 'STACKBLITZ'], }; return <DumiPreviewerActions {...config} />; };
export default PreviewerActions; `
今天遇到这个问题,贴一下代码
`import DumiPreviewerActions from 'dumi/theme-default/slots/PreviewerActions'; import React from 'react';
const PreviewerActions = (props) => { const config = { ...props, disabledActions: ['CSB', 'CODEPEN', 'STACKBLITZ'], }; return <DumiPreviewerActions {...config} />; };
export default PreviewerActions; `
今天遇到这个问题,贴一下代码
求帮助: 在theme -> slots -> PreviewActions 做覆盖并未生效, 不是很理解为什么没有生效 是还需要什么配置吗?
Question
代码位置
如题,如何快速简单禁用demo的打开 codesandbox 、stackblitz 等按钮