MCPcopy
hub / github.com/wavetermdev/waveterm / FakeBlock

Function FakeBlock

frontend/app/onboarding/onboarding-layout.tsx:22–72  ·  view source on GitHub ↗
({
    icon,
    name,
    highlighted,
    className,
    markdown,
    imgsrc,
    editorText,
    editorFileName,
    editorLanguage,
}: FakeBlockProps)

Source from the content-addressed store, hash-verified

20};
21
22export const FakeBlock = ({
23 icon,
24 name,
25 highlighted,
26 className,
27 markdown,
28 imgsrc,
29 editorText,
30 editorFileName,
31 editorLanguage,
32}: FakeBlockProps) => {
33 return (
34 <div
35 className={cn(
36 "w-full h-full bg-background rounded flex flex-col overflow-hidden border-2",
37 highlighted ? "border-accent" : "border-border/50",
38 className
39 )}
40 >
41 <div className="flex items-center gap-2 px-2 py-1.5 bg-border/20 border-b border-border/50">
42 <i className={makeIconClass(icon, false) + " text-xs text-foreground/70"} />
43 <span className="text-xs text-foreground/70 flex-1">{name}</span>
44 <span className="inline-block [&_svg]:fill-foreground/50 [&_svg_path]:!fill-foreground/50">
45 <MagnifyIcon enabled={false} />
46 </span>
47 <i className={makeIconClass("xmark-large", false) + " text-xs text-foreground/50"} />
48 </div>
49 <div className="flex-1 flex items-center justify-center overflow-auto p-4">
50 {editorText ? (
51 <div className="w-full h-full">
52 <CodeEditor
53 blockId="fake-block"
54 text={editorText}
55 readonly={true}
56 fileName={editorFileName}
57 language={editorLanguage ?? "shell"}
58 />
59 </div>
60 ) : imgsrc ? (
61 <img src={imgsrc} alt={name} className="max-w-full max-h-full object-contain" />
62 ) : markdown ? (
63 <div className="w-full">
64 <WaveStreamdown text={markdown} />
65 </div>
66 ) : (
67 <i className={makeIconClass(icon, false) + " text-4xl text-foreground/50"} />
68 )}
69 </div>
70 </div>
71 );
72};
73
74export const FakeLayout = () => {
75 const layoutRef = useRef<HTMLDivElement>(null);

Callers

nothing calls this directly

Calls 2

cnFunction · 0.90
makeIconClassFunction · 0.90

Tested by

no test coverage detected