MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / useTabBackground

Function useTabBackground

frontend/app/block/blockutil.tsx:175–186  ·  view source on GitHub ↗
(
    waveEnv: TabBackgroundEnv,
    tabId: string | null
)

Source from the content-addressed store, hash-verified

173}
174
175export function useTabBackground(
176 waveEnv: TabBackgroundEnv,
177 tabId: string | null
178): [string, string, BackgroundConfigType] {
179 const tabActiveBorderColorDirect = jotai.useAtomValue(waveEnv.getTabMetaKeyAtom(tabId, "bg:activebordercolor"));
180 const tabBorderColorDirect = jotai.useAtomValue(waveEnv.getTabMetaKeyAtom(tabId, "bg:bordercolor"));
181 const tabBg = jotai.useAtomValue(waveEnv.getTabMetaKeyAtom(tabId, "tab:background"));
182 const configBg = jotai.useAtomValue(waveEnv.getConfigBackgroundAtom(tabBg));
183 const tabActiveBorderColor = tabActiveBorderColorDirect ?? configBg?.["bg:activebordercolor"];
184 const tabBorderColor = tabBorderColorDirect ?? configBg?.["bg:bordercolor"];
185 return [tabBorderColor, tabActiveBorderColor, configBg];
186}
187
188export const Input = React.memo(
189 ({ decl, className, preview }: { decl: HeaderInput; className: string; preview: boolean }) => {

Callers 2

aipanel.tsxFile · 0.90
blockframe.tsxFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected