Add transparent buffer around open panels

This commit is contained in:
Frank Noirot
2024-02-22 12:26:58 -05:00
parent 40479d177f
commit 42ad854aee
2 changed files with 13 additions and 2 deletions

View File

@ -140,7 +140,7 @@ export function App() {
<Resizable
className={
'pointer-events-none h-full flex flex-col flex-1 z-10 my-5 ml-5 pr-1 transition-opacity transition-duration-75 ' +
+paneOpacity
paneOpacity
}
defaultSize={{
width: '550px',

View File

@ -39,7 +39,18 @@
}
.panel[open] {
@apply flex-grow max-h-full h-48 my-1 rounded;
@apply relative flex-grow max-h-full h-48 my-1 rounded;
}
/*
Open panels have a little bit of a buffer around them
to make it harder to accidentally click or interact with the stream behind them.
The right side buffer is a little smaller so people don't get frustrated by it.
TODO: make this logic flexible for if the panel is on the right side of the screen.
*/
.panel[open]::before {
@apply absolute -inset-4 -right-1 z-0;
@apply content-[''];
}
.panel[open] + .panel[open],