({ src }: { src: string })
| 13 | } |
| 14 | |
| 15 | function ImageInline({ src }: { src: string }) { |
| 16 | const [fullscreen, setFullscreen] = useState(false); |
| 17 | |
| 18 | return ( |
| 19 | <> |
| 20 | <img |
| 21 | src={src} |
| 22 | alt="" |
| 23 | onClick={() => setFullscreen(true)} |
| 24 | style={{ |
| 25 | maxWidth: "100%", |
| 26 | maxHeight: "400px", |
| 27 | borderRadius: "0.5rem", |
| 28 | marginTop: "0.5rem", |
| 29 | cursor: "pointer", |
| 30 | border: "1px solid var(--border)", |
| 31 | }} |
| 32 | /> |
| 33 | {fullscreen && ( |
| 34 | <div |
| 35 | onClick={() => setFullscreen(false)} |
| 36 | style={{ |
| 37 | position: "fixed", |
| 38 | inset: 0, |
| 39 | zIndex: 9999, |
| 40 | backgroundColor: "rgba(0,0,0,0.85)", |
| 41 | display: "flex", |
| 42 | alignItems: "center", |
| 43 | justifyContent: "center", |
| 44 | cursor: "zoom-out", |
| 45 | }} |
| 46 | > |
| 47 | <img |
| 48 | src={src} |
| 49 | alt="" |
| 50 | style={{ maxWidth: "95vw", maxHeight: "95vh", borderRadius: "0.5rem" }} |
| 51 | /> |
| 52 | </div> |
| 53 | )} |
| 54 | </> |
| 55 | ); |
| 56 | } |
| 57 | |
| 58 | interface RichDescriptionProps { |
| 59 | text: string; |
nothing calls this directly
no outgoing calls
no test coverage detected