This commit is contained in:
Maciej Caderek
2022-02-22 03:26:31 +01:00
parent 34b352c6c4
commit 2baf02dd60
16 changed files with 151 additions and 119 deletions

View File

@@ -0,0 +1,21 @@
.tab {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
height: 38px;
background: var(--color-tab);
min-width: 4rem;
}
.tab:hover {
background: var(--color-tab-light);
}
.tab--active {
background: var(--color-bg-block);
color: var(--color-text);
cursor: default;
}
.tab--active:hover {
background: var(--color-bg-block);
}

View File

@@ -0,0 +1,20 @@
import { Component } from "solid-js";
import "./Tab.css";
import { TabName } from "../../../state";
const Tab: Component<{
name: TabName;
setTab: (name: TabName) => void;
isActive: boolean;
}> = (props) => {
return (
<button
class={"tab" + (props.isActive ? " tab--active" : "")}
onClick={() => props.setTab(props.name)}
>
{props.children}
</button>
);
};
export default Tab;