add isActiveTab method
This commit is contained in:
parent
6d2f2efcf6
commit
9ed34f3704
|
@ -132,6 +132,11 @@ function onTabClick(tab: Tab, ev: MouseEvent): void {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const isActiveTab = (index: number) => {
|
||||||
|
const activeTab = tabRefs[props.tab]?.value ?? 0;
|
||||||
|
return index === activeTab;
|
||||||
|
};
|
||||||
|
|
||||||
const calcBg = () => {
|
const calcBg = () => {
|
||||||
const rawBg = metadata?.bg || 'var(--bg)';
|
const rawBg = metadata?.bg || 'var(--bg)';
|
||||||
const tinyBg = tinycolor(rawBg.startsWith('var(') ? getComputedStyle(document.documentElement).getPropertyValue(rawBg.slice(4, -1)) : rawBg);
|
const tinyBg = tinycolor(rawBg.startsWith('var(') ? getComputedStyle(document.documentElement).getPropertyValue(rawBg.slice(4, -1)) : rawBg);
|
||||||
|
|
Loading…
Reference in New Issue