import type { UIContext } from '@midscene/core'; import { Button } from 'antd'; import type React from 'react'; import Blackboard from '../blackboard'; import { iconForStatus } from '../misc'; import DemoData from '../playground/playground-demo-ui-context.json'; import './index.less'; interface ContextPreviewProps { uiContextPreview: UIContext | undefined; setUiContextPreview: (context: UIContext) => void; showContextPreview: boolean; } export const ContextPreview: React.FC = ({ uiContextPreview, setUiContextPreview, showContextPreview, }) => { if (!showContextPreview) { return null; } return (

UI Context

{uiContextPreview ? ( ) : (
{iconForStatus('failed')} No UI context
To load the UI context, you can either use the demo data above, or click the 'Send to Playground' in the report page.
)}
); };