nice clean sidebar!!! but no effect of selecting ohh well
This commit is contained in:
@@ -50,22 +50,31 @@ button {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
/* custom scrollbar */
|
||||
/* Designing for scroll-bar */
|
||||
::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
width: 4px;
|
||||
}
|
||||
|
||||
/* Track */
|
||||
::-webkit-scrollbar-track {
|
||||
background-color: transparent;
|
||||
background: gainsboro;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
/* Handle */
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: #d6dee1;
|
||||
border-radius: 20px;
|
||||
border: 6px solid transparent;
|
||||
background-clip: content-box;
|
||||
@apply bg-gray-400;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
/* Handle on hover */
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background-color: #a8bbbf;
|
||||
background: #555;
|
||||
}
|
||||
|
||||
.direction-ltr {
|
||||
direction: ltr;
|
||||
}
|
||||
.flipped {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
@@ -34,8 +34,6 @@ export default React.memo(function LineRow({
|
||||
);
|
||||
|
||||
const handleActivateLine = useCallback(() => {
|
||||
toast('selected channel');
|
||||
|
||||
handleSelectLine(line.lineDetails._id.toString());
|
||||
}, [handleSelectLine, line.lineDetails, index]);
|
||||
|
||||
@@ -133,7 +131,7 @@ export default React.memo(function LineRow({
|
||||
className={`flex flex-row items-center justify-start gap-2 px-4 py-4 hover:bg-gray-200
|
||||
cursor-pointer transition-all relative z-50 rounded
|
||||
${isUserToggleTuned && ' bg-gray-100 shadow-2xl '}
|
||||
${isSelected && ' bg-gray-200 scale-110 shadow-2xl translate-x-3 '}
|
||||
${isSelected && ' bg-gray-200 shadow-2xl'}
|
||||
`}
|
||||
>
|
||||
{/* channel picture */}
|
||||
|
||||
@@ -99,20 +99,22 @@ export default function SidePanel() {
|
||||
)}
|
||||
|
||||
{/* rest of the lines */}
|
||||
<div className={'flex flex-col flex-1 mr-[-100px] pr-[100px] overflow-y-auto'}>
|
||||
{initialRoomsFetch.loading ? (
|
||||
<Skeleton />
|
||||
) : (
|
||||
allChannels.map((masterLineData, index) => (
|
||||
<LineRow
|
||||
index={index}
|
||||
key={`terminalListLines-${masterLineData.lineDetails._id.toString()}`}
|
||||
line={masterLineData}
|
||||
handleSelectLine={handleSelectLine}
|
||||
isSelected={masterLineData.lineDetails._id.toString() === selectedLineId}
|
||||
/>
|
||||
))
|
||||
)}
|
||||
<div className={'flex-1 overflow-y-auto flipped'}>
|
||||
<div className="flex flex-col direction-ltr">
|
||||
{initialRoomsFetch.loading ? (
|
||||
<Skeleton />
|
||||
) : (
|
||||
allChannels.map((masterLineData, index) => (
|
||||
<LineRow
|
||||
index={index}
|
||||
key={`terminalListLines-${masterLineData.lineDetails._id.toString()}`}
|
||||
line={masterLineData}
|
||||
handleSelectLine={handleSelectLine}
|
||||
isSelected={masterLineData.lineDetails._id.toString() === selectedLineId}
|
||||
/>
|
||||
))
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* user control panel */}
|
||||
|
||||
Reference in New Issue
Block a user