diff --git a/app/components/PinnedDocuments.tsx b/app/components/PinnedDocuments.tsx index 7cd35ba52..7244f9775 100644 --- a/app/components/PinnedDocuments.tsx +++ b/app/components/PinnedDocuments.tsx @@ -23,6 +23,7 @@ import breakpoint from "styled-components-breakpoint"; import Pin from "~/models/Pin"; import DocumentCard from "~/components/DocumentCard"; import useStores from "~/hooks/useStores"; +import { ResizingHeightContainer } from "./ResizingHeightContainer"; type Props = { /** Pins to display */ @@ -98,27 +99,36 @@ function PinnedDocuments({ limit, pins, canUpdate, ...rest }: Props) { collisionDetection={closestCenter} onDragEnd={handleDragEnd} > - - - - {items.map((documentId) => { - const document = documents.get(documentId); - const pin = pins.find((pin) => pin.documentId === documentId); + + + + + {items.map((documentId) => { + const document = documents.get(documentId); + const pin = pins.find((pin) => pin.documentId === documentId); - return document ? ( - 1} - pin={pin} - {...rest} - /> - ) : null; - })} - - - + return document ? ( + 1} + pin={pin} + {...rest} + /> + ) : null; + })} + + + + ); } diff --git a/app/scenes/Collection.tsx b/app/scenes/Collection.tsx index 4cc315e0a..2585aad0c 100644 --- a/app/scenes/Collection.tsx +++ b/app/scenes/Collection.tsx @@ -12,6 +12,7 @@ import { } from "react-router-dom"; import styled from "styled-components"; import breakpoint from "styled-components-breakpoint"; +import { s } from "@shared/styles"; import Collection from "~/models/Collection"; import Search from "~/scenes/Search"; import Badge from "~/components/Badge"; @@ -178,90 +179,97 @@ function CollectionScene() { canUpdate={can.update} /> - - - {t("Documents")} - - - {t("Recently updated")} - - - {t("Recently published")} - - - {t("Least recently updated")} - - - {t("A–Z")} - - - - - - - - - - - - - - - - - - - - - - + + + + {t("Documents")} + + + {t("Recently updated")} + + + {t("Recently published")} + + + {t("Least recently updated")} + + + {t("A–Z")} + + + + + + + + + + + + + + + + + + + + + + + )} @@ -290,6 +298,11 @@ const StarButton = styled(Star)` } `; +const Documents = styled.div` + position: relative; + background: ${s("background")}; +`; + const HeadingWithIcon = styled(Heading)<{ $isStarred: boolean }>` display: flex; align-items: center; diff --git a/app/scenes/Home.tsx b/app/scenes/Home.tsx index bf8f95b6c..789b1d3f2 100644 --- a/app/scenes/Home.tsx +++ b/app/scenes/Home.tsx @@ -3,6 +3,8 @@ import { HomeIcon } from "outline-icons"; import * as React from "react"; import { useTranslation } from "react-i18next"; import { Switch, Route } from "react-router-dom"; +import styled from "styled-components"; +import { s } from "@shared/styles"; import { Action } from "~/components/Actions"; import Empty from "~/components/Empty"; import Heading from "~/components/Heading"; @@ -48,54 +50,63 @@ function Home() { {!ui.languagePromptDismissed && } {t("Home")} - - - {t("Recently viewed")} - - - {t("Recently updated")} - - {t("Created by me")} - - - - {t("Weird, this shouldn’t ever be empty")}} - showCollection - /> - - - {t("You haven’t created any documents yet")}} - showCollection - /> - - - - {t( - "Documents you’ve recently viewed will be here for easy access" - )} - - } - showCollection - /> - - + + + + {t("Recently viewed")} + + + {t("Recently updated")} + + {t("Created by me")} + + + + {t("Weird, this shouldn’t ever be empty")}} + showCollection + /> + + + {t("You haven’t created any documents yet")} + } + showCollection + /> + + + + {t( + "Documents you’ve recently viewed will be here for easy access" + )} + + } + showCollection + /> + + + ); } +const Documents = styled.div` + position: relative; + background: ${s("background")}; +`; + export default observer(Home);