(isLink: boolean, isBold: boolean, val: ImageDiffMode, text: string)
| 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'; |
no outgoing calls
no test coverage detected