Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add scrollable wrapper to component #610

Merged
merged 1 commit into from
Nov 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions src/components/App/SideBar/Creator/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useEffect, useMemo } from 'react'
import styled from 'styled-components'
import { useGraphData } from '~/components/DataRetriever'
import { Divider } from '~/components/common/Divider'
import { Flex } from '~/components/common/Flex'
Expand All @@ -9,6 +10,22 @@ import { ErrorSection } from './ErrorSection'
import { Heading } from './Heading'
import { Timestamp } from './Timestamp'

const Wrapper = styled(Flex)`
height: 70vh;
padding-bottom: 45px;
overflow: scroll;

&::-webkit-scrollbar {
width: 1px;
height: 4px;
}

&::-webkit-scrollbar-thumb {
width: 1px;
height: 4px;
}
`

export const Creator = () => {
const data = useGraphData()
const selectedNode = useSelectedNode()
Expand Down Expand Up @@ -38,7 +55,7 @@ export const Creator = () => {
{flagErrorIsOpen && <ErrorSection />}

{!!selectedNodeTimestamps?.length && (
<>
<Wrapper>
<Flex pb={20}>
{selectedNodeTimestamps?.map((timestamp, index) => (
<Timestamp
Expand All @@ -51,7 +68,7 @@ export const Creator = () => {
</Flex>

<Divider />
</>
</Wrapper>
)}
</>
)
Expand Down
1 change: 1 addition & 0 deletions src/components/App/SideBar/SidebarSubView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const Wrapper = styled(Flex)(({ theme }) => ({
margin: '64px auto 20px 10px',
borderRadius: '16px',
zIndex: 29,
overflow: 'hidden',
[theme.breakpoints.up('sm')]: {
width: '390px',
},
Expand Down
Loading