Skip to content

Commit eeecdc7

Browse files
committed
Add custom scroll bar for pre tag
1 parent 0be6ac2 commit eeecdc7

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

react-app/src/components/AccountRefs.tsx

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ const AccountRefs = (props: any) => {
4545
window.open(`${BASE_URL}/accounts/${owner}`, '_blank');
4646
if (err.response) {
4747
setLoading(`${err.response.statusText} - Opened in a new tab`);
48+
} else {
49+
setLoading(err.message);
4850
}
4951
});
5052
} else {
@@ -84,7 +86,25 @@ const PreWrapper = styled.div`
8486
padding: 5px;
8587
font-size: 80%;
8688
overflow: scroll;
87-
max-width: 610px;
89+
max-width: 550px;
90+
&::-webkit-scrollbar-thumb {
91+
border-radius: 10px;
92+
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
93+
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
94+
background-color: var(--primary);
95+
}
96+
97+
&::-webkit-scrollbar-track {
98+
box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.3);
99+
-webkit-box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.3);
100+
border-radius: 10px;
101+
background-color: #f5f5f5;
102+
}
103+
&::-webkit-scrollbar {
104+
width: 8px;
105+
height: 8px;
106+
background-color: #f5f5f5;
107+
}
88108
}
89109
`;
90110
export default AccountRefs;

0 commit comments

Comments
 (0)