diff --git a/src/components/FileManager/index.js b/src/components/FileManager/index.js index 3c3f175..abb2fa5 100644 --- a/src/components/FileManager/index.js +++ b/src/components/FileManager/index.js @@ -1,5 +1,7 @@ import React from "react"; +import "./index.scss"; + import BreadCrumb from "../BreadCrumb"; import SearchBox from "../SearchBox"; import TitleSubtitle from "../TitleSubtitle"; @@ -10,13 +12,12 @@ import Folderlists from "../Folderlist"; import graySearchIcon from "./images/gray-search-icon.svg"; import arrowLeft from "./images/arrow-left.svg"; -import plus from "./images/plus.svg"; const FileManager = () => { return (
{/* ? right Section */} -
+
{/* ? breadCrumb */}
@@ -78,13 +79,13 @@ const FileManager = () => { />
+ {/* folderLists */}
- {/* left Section */} - +
fsad
); }; diff --git a/src/components/Folderlist/index.js b/src/components/Folderlist/index.js index 5ad06e8..1855369 100644 --- a/src/components/Folderlist/index.js +++ b/src/components/Folderlist/index.js @@ -1,5 +1,7 @@ import React from "react"; +import "./index.scss"; + // ? images import folder from "./images/folder-open.svg"; import more from "./images/more.svg"; @@ -9,11 +11,42 @@ import pic3 from "./images/profile-pic3.svg"; const Folderlists = ({ items }) => { return ( -
+
{ + const slider = window.document.querySelector(".tabbar"); + window.isDown = true; + window.startX = e.pageX - slider.offsetLeft; + window.scrollLeft = slider.scrollLeft; + }} + onMouseLeave={(e) => { + window.isDown = false; + }} + onMouseUp={(e) => { + window.isDown = false; + }} + onMouseMove={(e) => { + const slider = window.document.querySelector(".tabbar"); + if (!window.isDown) return; + e.preventDefault(); + const x = e.pageX - slider.offsetLeft; + const walk = (x - window.startX) * 1; + slider.scrollLeft = window.scrollLeft - walk; + }} + > {items.map((item, index) => (
{ + if (window.isDown) return e.preventDefault(); + ///do here + }} + aria-current="page" key={index} >
@@ -23,7 +56,7 @@ const Folderlists = ({ items }) => { src={item.dropDownIcon} className="rotate-90 w-5 cursor-pointer mr-3" /> - {item.users.slice(0, 3).map((user, i) => ( + {item.users.slice(0, 8).map((user, i) => ( { return ( -
+
{items.map((item, index) => (