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.

Commitd4edf47

Browse files
committed
refactor(sidebar-footer): add basic ui
1 parent43a703c commitd4edf47

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed

‎src/containers/Sidebar/Footer.js‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
importReactfrom'react'
2+
// eslint-disable-next-line import/named
3+
import{ICON_CMD}from'@config'
4+
5+
import{Wrapper,InnerWrapper,SettingIcon}from'./styles/footer'
6+
7+
constFooter=({ pin})=>(
8+
<Wrapperpin={pin}>
9+
<InnerWrapperpin={pin}>
10+
<SettingIconsrc={`${ICON_CMD}/setting.svg`}/>
11+
</InnerWrapper>
12+
</Wrapper>
13+
)
14+
15+
exportdefaultFooter

‎src/containers/Sidebar/index.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { connectStore, buildLog } from '@utils'
1010

1111
importHeaderfrom'./Header'
1212
importMenuListfrom'./MenuList'
13+
importFooterfrom'./Footer'
1314

1415
import{Wrapper}from'./styles'
1516
import{useInit,onSortMenuEnd}from'./logic'
@@ -45,6 +46,7 @@ const SidebarContainer = ({ sidebar }) => {
4546
onSortEnd={onSortMenuEnd}
4647
distance={5}
4748
/>
49+
<Footerpin={pin}/>
4850
</Wrapper>
4951
)
5052
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
importstyledfrom'styled-components'
2+
3+
import{theme,cs}from'@utils'
4+
importImgfrom'@Img'
5+
6+
exportconstWrapper=styled.div`
7+
// margin-bottom:${({ pin})=>(pin ?'0' :'20px')};
8+
margin-top: -20px;
9+
background:${theme('sidebar.bg')};
10+
box-shadow: -1px -4px 4px 0px rgba(0,0,0,0.2);
11+
border-top: 1px dashed #316d7b;
12+
z-index: 1;
13+
`
14+
exportconstInnerWrapper=styled.div`
15+
height: 5vh;
16+
color: wheat;
17+
${cs.flex('align-both')};
18+
`
19+
exportconstSettingIcon=styled(Img)`
20+
fill:${theme('sidebar.menuLink')};
21+
width: 16px;
22+
height: 16px;
23+
`

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp