Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commita609f1e

Browse files
committed
refactor(mail-panel): use custom-scrollbar
1 parente3024f2 commita609f1e

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

‎src/containers/MailBox/MailsPanel.js‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
importReactfrom'react'
22
importRfrom'ramda'
3+
import{OverlayScrollbarsComponent}from'overlayscrollbars-react'
34

45
// eslint-disable-next-line import/named
56
import{ICON_CMD}from'@config'
67
importTabSelectorfrom'@components/TabSelector'
78

8-
import{Wrapper,SeeAllMessages}from'./styles/mails_panel'
9+
import{Wrapper,ContentWrapper,SeeAllMessages}from'./styles/mails_panel'
910
importMailListsfrom'./MailLists'
1011

1112
import{selectChange,seeAll}from'./logic'
@@ -48,7 +49,13 @@ const MailsPannel = ({ activeRaw, mailStatus, pagedMentions }) => {
4849
activeRaw={activeRaw}
4950
onChange={selectChange}
5051
/>
51-
<MailListsactiveRaw={activeRaw}pagedMentions={pagedMentions}/>
52+
<OverlayScrollbarsComponent
53+
options={{scrollbars:{autoHide:'scroll',autoHideDelay:200}}}
54+
>
55+
<ContentWrapper>
56+
<MailListsactiveRaw={activeRaw}pagedMentions={pagedMentions}/>
57+
</ContentWrapper>
58+
</OverlayScrollbarsComponent>
5259
<SeeAllMessagesonClick={seeAll}>查看全部消息</SeeAllMessages>
5360
</Wrapper>
5461
)

‎src/containers/MailBox/index.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import React from 'react'
88

99
import{connectStore,buildLog}from'@utils'
1010
importPopoverfrom'@components/Popover'
11+
1112
importMailsPanelfrom'./MailsPanel'
1213

1314
import{Wrapper,NofityDot,HeaderMailIcon}from'./styles'

‎src/containers/MailBox/styles/mails_panel.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ import { theme } from '@utils'
55
exportconstWrapper=styled.div`
66
width: 370px;
77
min-height: 300px;
8-
height:auto;
8+
height:400px;
99
padding: 10px;
1010
`
11+
exportconstContentWrapper=styled.div`
12+
height: 300px;
13+
`
1114
exportconstSeeAllMessages=styled.div`
1215
color:${theme('banner.title')};
1316
text-align: center;

‎src/containers/MailBox/styles/mention_list.js‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ export const Wrapper = styled.div`
99
`
1010
exportconstListsWrapper=styled.div`
1111
width: 340px;
12-
min-height: 280px;
13-
max-height: 400px;
14-
overflow-y: scroll;
15-
overflow-x: hidden;
1612
`
1713
exportconstUserLabel=styled.div`
1814
${cs.flex('align-center')};

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp