-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add left-right resizer functionality to SplitView component
- Loading branch information
1 parent
42edf84
commit 02f79da
Showing
2 changed files
with
78 additions
and
64 deletions.
There are no files selected for viewing
53 changes: 34 additions & 19 deletions
53
src/pages/commonFeed/components/FeedLayout/components/SplitView/SplitView.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,42 @@ | ||
@import "../../../../../../constants"; | ||
@import "../../../../../../constants.scss"; | ||
|
||
.resizer { | ||
flex-shrink: 0; | ||
z-index: 99; | ||
background: transparent; | ||
background-clip: padding-box; | ||
opacity: 0.2; | ||
box-sizing: border-box; | ||
.container { | ||
display: flex; | ||
height: 100%; | ||
overflow: hidden; | ||
} | ||
|
||
.left, .center, .right { | ||
height: 100%; | ||
overflow-y: auto; | ||
} | ||
|
||
.divider { | ||
width: 4px; | ||
background-color: $gray-200; | ||
cursor: col-resize; | ||
transition: background-color 0.2s ease; | ||
|
||
&:hover { | ||
transition: all 2s ease; | ||
background-color: $blue-500; | ||
} | ||
|
||
&:global(.vertical) { | ||
width: 0.6875rem; | ||
margin: 0 -0.3125rem; | ||
border-left: 0.3125rem solid transparent; | ||
border-right: 0.3125rem solid transparent; | ||
cursor: col-resize; | ||
&::after { | ||
content: ''; | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
transform: translate(-50%, -50%); | ||
width: 16px; | ||
height: 16px; | ||
background-image: url('path/to/your/resize-icon.svg'); | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
opacity: 0; | ||
transition: opacity 0.2s ease; | ||
} | ||
|
||
&:hover { | ||
border-left: 0.3125rem solid #{$split-view-resizer-border-hover-color}; | ||
border-right: 0.3125rem solid #{$split-view-resizer-border-hover-color}; | ||
} | ||
&:hover::after { | ||
opacity: 1; | ||
} | ||
} |
89 changes: 44 additions & 45 deletions
89
src/pages/commonFeed/components/FeedLayout/components/SplitView/SplitView.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters