({ blockId, model, termRef }: TermThemeProps)
| 15 | } |
| 16 | |
| 17 | const TermThemeUpdater = ({ blockId, model, termRef }: TermThemeProps) => { |
| 18 | const fullConfig = useAtomValue(atoms.fullConfigAtom); |
| 19 | const blockTermTheme = useAtomValue(model.termThemeNameAtom); |
| 20 | const transparency = useAtomValue(model.termTransparencyAtom); |
| 21 | const [theme, _] = computeTheme(fullConfig, blockTermTheme, transparency); |
| 22 | useEffect(() => { |
| 23 | if (termRef.current?.terminal) { |
| 24 | termRef.current.terminal.options.theme = theme; |
| 25 | } |
| 26 | }, [theme]); |
| 27 | return null; |
| 28 | }; |
| 29 | |
| 30 | export { TermThemeUpdater }; |
nothing calls this directly
no test coverage detected