import React from 'react'; import type { IPreviewerProps } from 'dumi'; import { LiveProvider, useTabMeta } from 'dumi'; import CodePreviewer from './CodePreviewer'; import DesignPreviewer from './DesignPreviewer'; export interface AntdPreviewerProps extends IPreviewerProps { originDebug?: IPreviewerProps['debug']; } const Previewer: React.FC = (props) => { const tab = useTabMeta(); if (tab?.frontmatter.title === 'Design') { return ; } const codePreviewer = ; if (props.live === false || props.iframe) { return codePreviewer; } return ( type === 'FILE')[0][1] .value } demoId={props.asset.id} > {codePreviewer} ); }; export default Previewer;