MCPcopy Create free account
hub / github.com/danvk/webdiff / linkOrB

Function linkOrB

ts/ImageDiffModeSelector.tsx:23–38  ·  view source on GitHub ↗
(isLink: boolean, isBold: boolean, val: ImageDiffMode, text: string)

Source from the content-addressed store, hash-verified

21
22 // Returns the text, optionally wrapped in a link and/or <b> tag.
23 const linkOrB = (isLink: boolean, isBold: boolean, val: ImageDiffMode, text: string) => {
24 const inner = isBold ? <b>{text}</b> : text;
25 if (isLink) {
26 return (
27 <a
28 href="#"
29 onClick={() => {
30 props.changeImageDiffMode(val);
31 }}>
32 {inner}
33 </a>
34 );
35 } else {
36 return inner;
37 }
38 };
39
40 const mode = props.imageDiffMode;
41 const isBlink = mode == 'blink';

Callers 1

ImageDiffModeSelectorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected