Skip to content

Commit

Permalink
Add scroll style
Browse files Browse the repository at this point in the history
  • Loading branch information
hanbyul-here committed Oct 11, 2023
1 parent 7868db7 commit 93fda36
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions app/scripts/components/common/dropdown-scrollable.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { forwardRef } from 'react';
import styled from 'styled-components';
import { glsp } from '@devseed-ui/theme-provider';
import { glsp, themeVal } from '@devseed-ui/theme-provider';
import {
Dropdown,
DropdownProps,
Expand All @@ -16,8 +16,21 @@ const DropdownWithScroll = styled(Dropdown)`
padding: 0;
overflow: hidden;
max-height: 320px;
overflow-y: auto;
overscroll-behavior: none;
overflow-y: scroll;
/* Scroll style firefox */
scrollbar-color: ${themeVal('color.base-100')} transparent;
/* Scroll style for webkit - chrome, safari */
&::-webkit-scrollbar {
background-color: transparent;
}
&::-webkit-scrollbar-thumb {
background-color: ${themeVal('color.base-100')};
border-radius: ${themeVal('shape.rounded')}
}
${DropTitle} {
margin: 0;
Expand Down

0 comments on commit 93fda36

Please sign in to comment.