Skip to content

Commit f1c8db2

Browse files
authored
Merge pull request #1673 from Northeastern-Electric-Racing/#1297-finance-fixes-details-display-overflow
#1297 : Implementing first overflow option
2 parents 3c37f8f + feabae3 commit f1c8db2

1 file changed

Lines changed: 20 additions & 3 deletions

File tree

src/frontend/src/components/VerticalDetailDisplay.tsx

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,33 @@ interface VerticalDetailDisplayProps {
1616
const VerticalDetailDisplay: React.FC<VerticalDetailDisplayProps> = ({ label, content, boxStyle }) => {
1717
const theme = useTheme();
1818
const backgroundColor = theme.palette.mode === 'dark' ? theme.palette.grey[800] : theme.palette.grey[200];
19+
1920
return (
2021
<Box
21-
overflow={'hidden'}
22+
overflow={'auto'}
2223
whiteSpace={'nowrap'}
23-
sx={{ backgroundColor: backgroundColor, borderRadius: '10px', justifyContent: 'center', boxShadow: 1, ...boxStyle }}
24+
bgcolor={backgroundColor}
25+
borderRadius={'10px'}
26+
justifyContent={'center'}
27+
boxShadow={1}
28+
sx={{
29+
'&::-webkit-scrollbar': {
30+
height: '0.55rem' // Adjust the the thickness of the scrollbar
31+
},
32+
'&::-webkit-scrollbar-thumb': {
33+
backgroundColor: '#EF4345', //FinishLine 'red' color
34+
borderRadius: '10px' //make the scrollbar rounded
35+
},
36+
'&::-webkit-scrollbar-thumb:hover': {
37+
backgroundColor: '#b0191a' // Change to a darker shade of red on hover
38+
},
39+
...boxStyle
40+
}}
2441
>
2542
<Typography textOverflow={'ellipsis'} textAlign={'center'} fontSize={50}>
2643
{content}
2744
</Typography>
28-
<Typography textAlign={'center'} fontWeight={'bold'}>
45+
<Typography textAlign={'center'} fontWeight={'bold'} marginBottom={'5px'}>
2946
{label}
3047
</Typography>
3148
</Box>

0 commit comments

Comments
 (0)