From 5aa62e9af0bd462d36adbc462796e9bbdfa3ea5e Mon Sep 17 00:00:00 2001 From: Aminejv Date: Fri, 24 Sep 2021 18:18:05 +0100 Subject: [PATCH] feat(SceneFilesFolder): add filter components --- scenes/SceneFilesFolder.js | 103 ++++++++++++++++++------------------- 1 file changed, 51 insertions(+), 52 deletions(-) diff --git a/scenes/SceneFilesFolder.js b/scenes/SceneFilesFolder.js index 45cf8aa8..52df6743 100644 --- a/scenes/SceneFilesFolder.js +++ b/scenes/SceneFilesFolder.js @@ -1,70 +1,69 @@ import * as React from "react"; import * as Constants from "~/common/constants"; +import * as Filter from "~/components/core/Filter"; +import * as Styles from "~/common/styles"; import { css } from "@emotion/react"; -import { FileTypeGroup } from "~/components/core/FileTypeIcon"; import { GlobalCarousel } from "~/components/system/components/GlobalCarousel"; import ScenePage from "~/components/core/ScenePage"; -import DataView from "~/components/core/DataView"; -import EmptyState from "~/components/core/EmptyState"; import WebsitePrototypeWrapper from "~/components/core/WebsitePrototypeWrapper"; const STYLES_SCENE_PAGE = css` - padding: 20px 24px 44px; + padding: 0px; @media (max-width: ${Constants.sizes.mobile}px) { - padding: 31px 16px 44px; + padding: 0px; } `; -export default class SceneFilesFolder extends React.Component { - state = { - index: -1, - }; +const STYLES_FILTER_TITLE_WRAPPER = css` + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +`; - render() { - let files = this.props.viewer?.library; - const tab = this.props.page.params?.tab || "grid"; +export default function SceneFilesFolder({ viewer, page, onAction, isMobile }) { + const [index, setIndex] = React.useState(-1); - return ( - - - this.setState({ index })} - /> + let objects = viewer.library; + // const tab = page.params?.tab || "grid"; - {files.length ? ( - - ) : ( - - -
- Drag and drop files into Slate to upload, or press the plus button to save a file or - link -
-
- )} -
-
- ); - } + return ( + + + setIndex(index)} + /> + + +
+ + +
+
+ +
+ +
+ +
+ + +
+
+
+
+ ); }