Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 5e2fcbe

Browse files
committed
refactor(scrollbar): mv id out of styled-file to view layer
1 parent 6e14519 commit 5e2fcbe

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

containers/Doraemon/ResultsList.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const HintIcon = ({ index, active, cur, length }) => {
3030
}
3131

3232
const ResultsList = ({ searchValue, searchThread, suggestions, activeRaw }) => (
33-
<Wrapper>
33+
<Wrapper id="suggestion-scroller">
3434
<SuggestionWrapper empty={suggestions.length === 0}>
3535
{suggestions.map((suggestion, i) => (
3636
<InfoBar

containers/Doraemon/styles/results_list.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import styled from 'styled-components'
33
import Img from '@components/Img'
44
import { theme, animate, cs } from '@utils'
55

6-
export const Wrapper = styled.div.attrs(() => ({
7-
id: 'suggestion-scroller',
6+
export const Wrapper = styled.div.attrs(({ id }) => ({
7+
id,
88
}))`
99
width: 100%;
1010
overflow: hidden;

containers/Sidebar/MenuList.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const MenuList = SortableContainer(
2323

2424
return (
2525
<Wrapper>
26-
<ScrollWrapper>
26+
<ScrollWrapper id="sidebar-scroller">
2727
{homeCommunities.map(item => (
2828
<MenuBar
2929
key={item.raw}

containers/Sidebar/styles/menu_list.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ export const Wrapper = styled.div`
1010
// overflow-y: scroll;
1111
transition: left 0.2s;
1212
`
13-
export const ScrollWrapper = styled.div.attrs(() => ({
14-
id: 'sidebar-scroller',
13+
export const ScrollWrapper = styled.div.attrs(({ id }) => ({
14+
id,
1515
}))`
16-
// max-height: calc(100% - 20px);
17-
// height 500px;
1816
height: calc(100% - 20px);
1917
`

0 commit comments

Comments
 (0)