Skip to content

Commit

Permalink
Scrollbar visible on darkmode issue scrtlabs#204
Browse files Browse the repository at this point in the history
  • Loading branch information
David Rodriguez committed May 10, 2021
1 parent 6bfd00d commit f4e2e18
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/pages/Pool/WithdrawTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ export class WithdrawTab extends React.Component<
}

state = { searchText: '' };

renderThumbVertical=()=>{
return <div className={`${styles.thumb} ${styles[this.props.theme.currentTheme]}`}></div>
}
render() {
const pairs = Array.from(new Set(this.props.pairs.values()));

Expand Down Expand Up @@ -64,7 +66,7 @@ export class WithdrawTab extends React.Component<
/>
</div>
) : null}
<Scrollbars style={{ width: 455, height: 300 }} className={styles.withdrawLiquitityContent}>
<Scrollbars autoHide renderThumbVertical={this.renderThumbVertical} style={{ width: 455, height: 300 }} className={styles.withdrawLiquitityContent}>
{pairs
.filter(p => {
return (
Expand Down
10 changes: 10 additions & 0 deletions src/pages/Pool/styles.styl
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,14 @@ input {
color: black !important;
background: rgb(222, 222, 222) !important;
}
}

.thumb{
border-radius: 20px;
&.dark{
background: #555;
}
&.light {
background: #ccc;
}
}
5 changes: 4 additions & 1 deletion src/pages/TokenModal/TokenSelector/TokenSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ export const TokenSelector = (props: {
const filteredTokens = props.tokens.filter(t => {
return (t.symbol + String(t.address)).toLowerCase().includes(searchText);
});
const renderThumbVertical=()=>{
return <div className={`${styles.thumb} ${styles[theme.currentTheme]}`}></div>
}
const {theme} =useStores();
return (
<Modal
Expand Down Expand Up @@ -93,7 +96,7 @@ export const TokenSelector = (props: {
</div>
) : (
<div className={`${styles.listTokens__container} ${styles[theme.currentTheme]}`}>
<Scrollbars className={styles.listTokens__subcontainer}>
<Scrollbars renderThumbVertical={renderThumbVertical} className={styles.listTokens__subcontainer}>
{
filteredTokens
.sort((a, b) => {
Expand Down
10 changes: 10 additions & 0 deletions src/pages/TokenModal/TokenSelector/styles.styl
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,14 @@
&.addCustomToken__button{
background: rgba(255, 255, 255, 0.1);
}
}

.thumb{
border-radius: 20px;
&.dark{
background: #555;
}
&.light {
background: #ccc;
}
}

0 comments on commit f4e2e18

Please sign in to comment.