From 494d7b3095ad9194ca20b17f1854048a1571ec6b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Sirois Date: Thu, 5 Sep 2019 09:21:00 -0400 Subject: [PATCH] feat(resources): add scrollbar to sidebar --- src/components/ResourcesSidebar/index.tsx | 32 +++++++++++++---------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/src/components/ResourcesSidebar/index.tsx b/src/components/ResourcesSidebar/index.tsx index f9d33d6..40b601a 100644 --- a/src/components/ResourcesSidebar/index.tsx +++ b/src/components/ResourcesSidebar/index.tsx @@ -1,5 +1,7 @@ import { graphql, Link, useStaticQuery } from "gatsby" import React, { memo, PropsWithChildren, useState } from "react" +import Scrollbar from "react-perfect-scrollbar" +import "react-perfect-scrollbar/dist/css/styles.css" import TriangleDown from "../../icons/triangle-down.svg" import Banner from "../../images/tph-banner.svg" import useSidebar from "./../../hooks/useSidebar" @@ -123,21 +125,23 @@ export function ResourcesSidebar(props: React.HTMLAttributes) { return ( - - - - - {tree.map((node, index) => plantTree(node, index, true))} + + + + + + {tree.map((node, index) => plantTree(node, index, true))} - - about - rules - faq - hotbot - resources - tech - - + + about + rules + faq + hotbot + resources + tech + + + ) }