mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 17:03:49 +01:00
add isActiveTab method
This commit is contained in:
parent
279354ed89
commit
4b74514250
@ -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 rawBg = metadata?.bg || 'var(--bg)';
|
||||
const tinyBg = tinycolor(rawBg.startsWith('var(') ? getComputedStyle(document.documentElement).getPropertyValue(rawBg.slice(4, -1)) : rawBg);
|
||||
|
Loading…
Reference in New Issue
Block a user