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.

Commit788aa65

Browse files
committed
fix annoying scrollbar in Doraemon pannel
1 parent7c01d75 commit788aa65

File tree

2 files changed

+41
-32
lines changed

2 files changed

+41
-32
lines changed

‎containers/Doraemon/index.js‎

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,24 @@ import {
2323
PageOverlay,
2424
PanelContainer,
2525
InfoBar,
26-
Wraper,
26+
Wrapper,
27+
SuggestionWrapper,
2728
AlertBar,
28-
// AvatarImg,
2929
AvatarWrapper,
3030
ContentWraper,
3131
Title,
3232
Desc,
3333
Hint,
34-
// RepoLang,
35-
// RepoStar,
36-
// SubInfoWraper,
34+
HintEnter,
3735
}from'./styles'
3836

3937
constdebug=makeDebugger('C:Doraemon')
4038

4139
constHintIcon=({ index, active, cur})=>{
4240
returnactive===cur ?(
43-
<Hint>
41+
<HintEnter>
4442
<SuggestionIcons.enter/>
45-
</Hint>
43+
</HintEnter>
4644
) :(
4745
<Hint>^{index}</Hint>
4846
)
@@ -74,25 +72,27 @@ class DoraemonContainer extends React.Component {
7472
<PanelContainervisible={visible}>
7573
<InputEditorvalue={inputValue}searching={false}prefix={prefix}/>
7674
{logic.repoNotFound(store)&&<AlertBar>Repo not found</AlertBar>}
77-
<Wraperempty={suggestions.length===0}>
78-
{suggestions.map((suggestion,i)=>(
79-
<InfoBar
80-
active={activeRaw===suggestion.raw}
81-
key={suggestion.raw}
82-
id={suggestion.raw}
83-
onMouseEnter={logic.navToSuggestion.bind(this,suggestion)}
84-
>
85-
<AvatarWrapper>
86-
<NodeIconraw={suggestion.raw}/>
87-
</AvatarWrapper>
88-
<ContentWraper>
89-
<Title>{suggestion.title}</Title>
90-
<Desc>{suggestion.desc}</Desc>
91-
</ContentWraper>
92-
<HintIconindex={i}active={activeRaw}cur={suggestion.raw}/>
93-
</InfoBar>
94-
))}
95-
</Wraper>
75+
<Wrapper>
76+
<SuggestionWrapperempty={suggestions.length===0}>
77+
{suggestions.map((suggestion,i)=>(
78+
<InfoBar
79+
active={activeRaw===suggestion.raw}
80+
key={suggestion.raw}
81+
id={suggestion.raw}
82+
onMouseEnter={logic.navToSuggestion.bind(this,suggestion)}
83+
>
84+
<AvatarWrapper>
85+
<NodeIconraw={suggestion.raw}/>
86+
</AvatarWrapper>
87+
<ContentWraper>
88+
<Title>{suggestion.title}</Title>
89+
<Desc>{suggestion.desc}</Desc>
90+
</ContentWraper>
91+
<HintIconindex={i}active={activeRaw}cur={suggestion.raw}/>
92+
</InfoBar>
93+
))}
94+
</SuggestionWrapper>
95+
</Wrapper>
9696
</PanelContainer>
9797
</div>
9898
)

‎containers/Doraemon/styles/index.js‎

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,19 @@ export const PanelContainer = styled.div`
5757
left: 50%;
5858
margin-left: -19vw;
5959
`
60-
exportconstWraper=styled.div`
60+
exportconstWrapper=styled.div`
61+
width: 100%;
62+
overflow: hidden;
63+
`
64+
65+
exportconstSuggestionWrapper=styled.div`
6166
position: relative;
6267
display:${props=>(props.empty ?'none' :'flex')};
6368
flex-direction: column;
6469
max-height: 60vh;
65-
overflow: scroll;
70+
overflow-y: scroll;
71+
overflow-x: hidden;
72+
width: 102%;
6673
`
6774

6875
// #001b21;
@@ -146,11 +153,13 @@ export const Desc = styled.div`
146153
exportconstHint=styled.div`
147154
color:${theme('u_panel.text')};
148155
margin-top: 10px;
156+
margin-right: 15px;
149157
width: 30px;
150-
151-
> svg {
152-
padding-right: 20px;
153-
}
158+
`
159+
exportconstHintEnter=styled.div`
160+
color:${theme('u_panel.text')};
161+
margin-top: 10px;
162+
margin-right: 10px;
154163
`
155164

156165
exportconstSubInfoWraper=styled.div`

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp