Add tooltip styling and positioning for sidebar toggle button
This commit is contained in:
@@ -28,6 +28,7 @@ const Header: React.FC = () => {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
<div className="tooltip">{toggleUI ? "Hide" : "Show"} sidebar</div>
|
||||||
<ToggleSidebarIcon />
|
<ToggleSidebarIcon />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -41,11 +41,23 @@
|
|||||||
min-height: 32px;
|
min-height: 32px;
|
||||||
min-width: 32px;
|
min-width: 32px;
|
||||||
border-radius: #{$border-radius-large};
|
border-radius: #{$border-radius-large};
|
||||||
|
position: relative;
|
||||||
|
.tooltip {
|
||||||
|
top: 6px;
|
||||||
|
right: -116px;
|
||||||
|
&::after {
|
||||||
|
left: 0px;
|
||||||
|
bottom: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
&:hover {
|
&:hover {
|
||||||
outline: 1px solid var(--border-color);
|
outline: 1px solid var(--border-color);
|
||||||
outline-offset: -1px;
|
outline-offset: -1px;
|
||||||
background: var(--background-color-drop-down);
|
background: var(--background-color-solid);
|
||||||
|
.tooltip {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateX(2px);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -379,7 +391,7 @@
|
|||||||
.tooltip {
|
.tooltip {
|
||||||
top: 6px;
|
top: 6px;
|
||||||
right: calc(100% + 6px);
|
right: calc(100% + 6px);
|
||||||
&::after{
|
&::after {
|
||||||
left: 100%;
|
left: 100%;
|
||||||
bottom: 50%;
|
bottom: 50%;
|
||||||
}
|
}
|
||||||
@@ -399,8 +411,8 @@
|
|||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
outline-color: var(--border-color-accent);
|
outline-color: var(--border-color-accent);
|
||||||
svg{
|
svg {
|
||||||
transition: all .2s;
|
transition: all 0.2s;
|
||||||
scale: 1.1;
|
scale: 1.1;
|
||||||
}
|
}
|
||||||
.tooltip {
|
.tooltip {
|
||||||
@@ -414,7 +426,7 @@
|
|||||||
background: var(--background-color-accent);
|
background: var(--background-color-accent);
|
||||||
outline: none;
|
outline: none;
|
||||||
&:hover {
|
&:hover {
|
||||||
svg{
|
svg {
|
||||||
scale: 1;
|
scale: 1;
|
||||||
}
|
}
|
||||||
background: var(--background-color-accent);
|
background: var(--background-color-accent);
|
||||||
|
|||||||
Reference in New Issue
Block a user