Skip to content

Commit

Permalink
[timeline-btn-bug] alt scrollbar
Browse files Browse the repository at this point in the history
Signed-off-by: David Echelberger <[email protected]>
  • Loading branch information
dechdev committed Apr 27, 2022
1 parent 390e003 commit dcee41a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/Cards/FireFlyCard.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box, Grid, Typography } from '@mui/material';
import { IFireFlyCard } from '../../interfaces';
import { DEFAULT_BORDER_RADIUS } from '../../theme';
import { altScrollbarStyle, DEFAULT_BORDER_RADIUS } from '../../theme';
import { FFArrowButton } from '../Buttons/FFArrowButton';

type Props = {
Expand All @@ -19,6 +19,7 @@ export const FireFlyCard: React.FC<Props> = ({ cardData, size }) => {
item
md={12}
lg={size === 'medium' ? 4 : 6}
sx={altScrollbarStyle}
>
<Box
p={2}
Expand Down
3 changes: 2 additions & 1 deletion src/pages/Activity/views/Timeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import {
IPagedEventResponse,
ITransaction,
} from '../../../interfaces';
import { DEFAULT_PADDING } from '../../../theme';
import { altScrollbarStyle, DEFAULT_PADDING } from '../../../theme';
import { fetchCatcher, fetchWithCredentials } from '../../../utils';
import { isOppositeTimelineEvent } from '../../../utils/timeline';
import { hasAnyEvent } from '../../../utils/wsEvents';
Expand Down Expand Up @@ -183,6 +183,7 @@ export const ActivityTimeline: () => JSX.Element = () => {
direction="column"
item
pt={DEFAULT_PADDING}
sx={altScrollbarStyle}
>
<FFTimelineHeader
leftHeader={t('submittedByMe')}
Expand Down
14 changes: 14 additions & 0 deletions src/theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,17 @@ export const themeOptions: ThemeOptions = {
},
},
};

export const altScrollbarStyle = {
overflow: 'overlay',
scrollbarColor: '#1e242a',
'&::-webkit-scrollbar, & *::-webkit-scrollbar': {
cursor: 'pointer',
backgroundColor: '#1e242a',
},
'&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb': {
borderRadius: 8,
backgroundColor: '#12171d',
border: '3px solid #1e242a',
},
};

0 comments on commit dcee41a

Please sign in to comment.