Skip to content

Commit

Permalink
useScrollbarClass()
Browse files Browse the repository at this point in the history
  • Loading branch information
katamartin committed Mar 18, 2022
1 parent 0b153cf commit 4e6890c
Show file tree
Hide file tree
Showing 3 changed files with 877 additions and 4,363 deletions.
6 changes: 4 additions & 2 deletions components/sidebar/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState, useEffect } from 'react'
import { Box, Badge, Text, Flex, Link } from 'theme-ui'
import { alpha } from '@theme-ui/color'
import { Box, Text, Link } from 'theme-ui'
import { useScrollbarClass } from '@carbonplan/components'
import Header from './header'
import Menu from './menu'
import Layers from './layers'
Expand All @@ -14,6 +14,7 @@ function Sidebar({
scrollSidebar,
}) {
const [showMenu, setShowMenu] = useState(false)
const className = useScrollbarClass()

useEffect(() => {
if (scrollSidebar) {
Expand Down Expand Up @@ -75,6 +76,7 @@ function Sidebar({
<Header showMenu={showMenu} toggleMenu={() => setShowMenu(!showMenu)} />
<Box
id='sidebar'
className={className}
sx={{
position: 'relative',
flex: 1,
Expand Down
Loading

2 comments on commit 4e6890c

@vercel
Copy link

@vercel vercel bot commented on 4e6890c Mar 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 4e6890c Aug 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.