MCPcopy Create free account
hub / github.com/wavetermdev/waveterm / TermThemeUpdater

Function TermThemeUpdater

frontend/app/view/term/termtheme.ts:17–28  ·  view source on GitHub ↗
({ blockId, model, termRef }: TermThemeProps)

Source from the content-addressed store, hash-verified

15}
16
17const 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
30export { TermThemeUpdater };

Callers

nothing calls this directly

Calls 1

computeThemeFunction · 0.90

Tested by

no test coverage detected