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.

Commit42d0ecb

Browse files
committed
chore: wip
1 parenta800835 commit42d0ecb

File tree

6 files changed

+23
-16
lines changed

6 files changed

+23
-16
lines changed

‎src/containers/Sidebar/MenuBar.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { useCallback } from 'react'
22
import{toLower}from'ramda'
33

44
import{ICON_CMD}from'@/config'
5-
import{uid}from'@/utils'
5+
//import { uid } from '@/utils'
66

77
importTrendLinefrom'@/components/TrendLine'
88

@@ -38,7 +38,7 @@ const MenuBar = ({ pin, sortOptActive, item, activeRaw, forceRerender }) => {
3838
active={!sortOptActive&&activeRaw===toLower(item.raw)}
3939
>
4040
<MenuItemIcon
41-
key={uid.gen()}
41+
key={item.raw}
4242
active={activeRaw===toLower(item.raw)}
4343
raw={item.raw}
4444
src={item.logo}
@@ -54,7 +54,7 @@ const MenuBar = ({ pin, sortOptActive, item, activeRaw, forceRerender }) => {
5454

5555
<MiniChartWrapperpin={pin}>
5656
<TrendLine
57-
key={uid.gen()}
57+
key={item.raw}
5858
data={item.contributesDigest}
5959
duration={300}
6060
radius={15}

‎src/containers/Sidebar/styles/footer.js‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,16 @@ export const SettingIcon = styled(Img)`
3131
`
3232

3333
exportconstOptionWrapper=styled.div`
34-
display:${({ pin})=>(pin ?'flex' :'none')};
34+
/* display:${({ pin})=>(pin ?'flex' :'none')}; */
35+
${cs.flex('justify-center')};
36+
opacity:${({ pin})=>(pin ?'1' :'0')};
3537
justify-content:${({ pin})=>(pin ?'center' :'')};
36-
width: 100%;
37-
margin-left: -8px;
38+
width: 1px;
3839
3940
${SidebarWrapper}:hover & {
40-
${cs.flex('justify-center')};
41+
opacity: 1;
42+
width: 100%;
43+
transition-delay: 0.4s;
4144
}
4245
`
4346
exportconstOptionDivider=styled.div`
@@ -54,7 +57,5 @@ export const OptionItem = styled.div`
5457
5558
font-weight:${({ active})=>(active ?'bold' :'normal')};
5659
57-
&:hover {
58-
cursor: pointer;
59-
}
60+
cursor: pointer;
6061
`

‎src/containers/Sidebar/styles/header.js‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export const Wrapper = styled.div`
1111
margin-bottom:${({ pin})=>(pin ?'0' :'20px')};
1212
${IndexWrapper}:hover & {
1313
margin-bottom: 4px;
14+
transition-delay: 0.4s;
1415
}
1516
`
1617
exportconstInnerWrapper=styled.div`
@@ -33,6 +34,7 @@ export const SiteLogoWrapper = styled.div`
3334
display:${({ pin})=>(pin ?'none' :'block')};
3435
${IndexWrapper}:hover & {
3536
display: none;
37+
transition-delay: 0.4s;
3638
}
3739
`
3840
exportconstSiteLogo=styled(Img)`
@@ -53,12 +55,10 @@ export const PinIcon = styled(Img)`
5355
transition: visibility 0s, opacity 0.3s linear;
5456
cursor: pointer;
5557
56-
&:hover {
57-
cursor: pointer;
58-
}
5958
${IndexWrapper}:hover & {
6059
visibility: visible;
6160
opacity: 1;
61+
transition-delay: 0.4s;
6262
}
6363
`
6464
exportconstSearchWrapper=styled.div`
@@ -69,6 +69,7 @@ export const SearchWrapper = styled.div`
6969
${IndexWrapper}:hover & {
7070
visibility: visible;
7171
opacity: 1;
72+
transition-delay: 0.4s;
7273
}
7374
`
7475
exportconstSearchInput=styled(Input)`

‎src/containers/Sidebar/styles/index.js‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,16 @@ export const Wrapper = styled.aside.attrs((props) => ({
1919
border-color:${theme('sidebar.borderColor')};
2020
z-index:${cs.zIndex.sidebar};
2121
22-
transition: width 0.2s, opacity 0.8s, box-shadow 0.1s linear 0.1s,
23-
background-color 0.3s;
24-
2522
&:hover {
2623
width: 260px;
2724
box-shadow: 3px 0 20px rgba(0, 0, 0, 0.2);
25+
transition-delay: 0.4s;
2826
}
27+
28+
transition: width 0.2s, opacity 0.8s, box-shadow 0.1s linear 0.1s,
29+
background-color 0.3s z-index 0.5s;
30+
2931
${cs.media.tablet`display: none`};
3032
`
33+
3134
exportconstholder=1

‎src/containers/Sidebar/styles/menu_bar.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export const Wrapper = styled.div`
1111
z-index:${cs.zIndex.sidebar+1};
1212
&:hover {
1313
background:${theme('sidebar.menuHover')};
14+
transition-delay: 0.4s;
1415
}
1516
`
1617
exportconstActiveBar=styled.div`

‎src/hooks/index.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ export { default as useOutsideClick } from './useOutsideClick'
99
export{defaultasuseTrans}from'./useTrans'
1010

1111
export{defaultasuseNetwork}from'react-use/lib/useNetwork'
12+
export{defaultasuseHover}from'react-use/lib/useHoverDirty'

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp