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

Commit fa7b0e6

Browse files
committed
refactor(sidebar): rename top/bottom shadow to header/footer
1 parent bed8a4a commit fa7b0e6

File tree

15 files changed

+36
-36
lines changed

15 files changed

+36
-36
lines changed

src/containers/Sidebar/Footer.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { ICON_CMD } from '@config'
44

55
import { Wrapper, InnerWrapper, SettingIcon } from './styles/footer'
66

7-
const Footer = ({ pin, showFooterBarShadow }) => (
8-
<Wrapper pin={pin} dropShadow={showFooterBarShadow}>
7+
const Footer = ({ pin, showFooterShadow }) => (
8+
<Wrapper pin={pin} dropShadow={showFooterShadow}>
99
<InnerWrapper pin={pin}>
1010
<SettingIcon src={`${ICON_CMD}/setting.svg`} />
1111
</InnerWrapper>

src/containers/Sidebar/MenuList.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const SortableMenuBar = SortableElement(
2020
)
2121

2222
const MenuList = SortableContainer(
23-
({ items, pin, activeRaw, forceRerender, showHomeBarShadow }) => {
23+
({ items, pin, activeRaw, forceRerender, showHeaderShadow }) => {
2424
const homeCommunities = R.filter(R.propEq('raw', 'home'), items)
2525
const sortableCommunities = R.reject(R.propEq('raw', 'home'), items)
2626

@@ -32,7 +32,7 @@ const MenuList = SortableContainer(
3232
pin={pin}
3333
item={item}
3434
activeRaw={activeRaw}
35-
dropShadow={showHomeBarShadow}
35+
dropShadow={showHeaderShadow}
3636
/>
3737
))}
3838
<OverlayScrollbarsComponent

src/containers/Sidebar/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ const SidebarContainer = ({ sidebar }) => {
2525
curCommunity,
2626
pin,
2727
searchCommunityValue,
28-
showHomeBarShadow,
29-
showFooterBarShadow,
28+
showHeaderShadow,
29+
showFooterShadow,
3030
communitiesData,
3131
forceRerender,
3232
} = sidebar
@@ -41,13 +41,13 @@ const SidebarContainer = ({ sidebar }) => {
4141
<MenuList
4242
items={communitiesData}
4343
pin={pin}
44-
showHomeBarShadow={showHomeBarShadow}
44+
showHeaderShadow={showHeaderShadow}
4545
forceRerender={forceRerender}
4646
activeRaw={activeRaw}
4747
onSortEnd={onSortMenuEnd}
4848
distance={5}
4949
/>
50-
<Footer pin={pin} showFooterBarShadow={showFooterBarShadow} />
50+
<Footer pin={pin} showFooterShadow={showFooterShadow} />
5151
</Wrapper>
5252
)
5353
}

src/containers/Sidebar/logic.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,19 @@ let sub$ = null
2828
export const setPin = () => store.mark({ pin: !store.pin })
2929

3030
export const anchorTop = () => {
31-
if (store) store.mark({ showHomeBarShadow: false })
31+
if (store) store.mark({ showHeaderShadow: false })
3232
}
3333

3434
export const anchorOffTop = () => {
35-
if (store) store.mark({ showHomeBarShadow: true })
35+
if (store) store.mark({ showHeaderShadow: true })
3636
}
3737

3838
export const anchorBottom = () => {
39-
if (store) store.mark({ showFooterBarShadow: false })
39+
if (store) store.mark({ showFooterShadow: false })
4040
}
4141

4242
export const anchorOffBottom = () => {
43-
if (store) store.mark({ showFooterBarShadow: true })
43+
if (store) store.mark({ showFooterShadow: true })
4444
}
4545

4646
export const searchOnFocus = () => store.mark({ pin: true })

src/containers/Sidebar/store.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ const SidebarStore = t
1515
// open: t.optional(t.boolean, false),
1616
pin: t.optional(t.boolean, false),
1717
// add shadow effect to homebar when user scroll the communities list
18-
showHomeBarShadow: t.optional(t.boolean, false),
18+
showHeaderShadow: t.optional(t.boolean, false),
1919
// add shadow effect to footer when user scroll the communities list
20-
showFooterBarShadow: t.optional(t.boolean, false),
20+
showFooterShadow: t.optional(t.boolean, false),
2121
searchCommunityValue: t.optional(t.string, ''),
2222

2323
/*

src/containers/Sidebar/styles/footer.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ export const Wrapper = styled.div`
99
background: ${theme('sidebar.bg')};
1010
1111
box-shadow: ${({ dropShadow }) =>
12-
dropShadow ? theme('sidebar.bottomShadow') : 'none'};
12+
dropShadow ? theme('sidebar.footerShadow') : 'none'};
1313
border-bottom: ${({ dropShadow }) =>
14-
dropShadow ? theme('sidebar.bottomShadowBorderBottom') : ''};
14+
dropShadow ? theme('sidebar.footerShadowBorderBottom') : ''};
1515
1616
z-index: 1;
1717
`

src/containers/Sidebar/styles/menu_bar.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ export const MenuItemBar = styled.div`
4141
color: ${theme('sidebar.menuLink')};
4242
4343
box-shadow: ${({ dropShadow }) =>
44-
dropShadow ? theme('sidebar.topShadow') : 'none'};
44+
dropShadow ? theme('sidebar.headerShadow') : 'none'};
4545
border-bottom: ${({ dropShadow }) =>
46-
dropShadow ? theme('sidebar.topShadowBorderBottom') : ''};
46+
dropShadow ? theme('sidebar.headerShadowBorderBottom') : ''};
4747
`
4848
export const MenuRow = styled.div`
4949
${cs.flex()};

utils/themes/skins/cyan.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ const cyan = {
109109
pinActive: primaryColor,
110110
menuLink: '#D9E6E5',
111111
borderColor: '#14363E',
112-
topShadow: '0px 6px 4px 0px rgba(0,0,0,0.2)',
113-
topShadowBorderBottom: '1px dashed #316d7b',
114-
bottomShadow: '-1px -4px 4px 0px rgba(0,0,0,0.2)',
115-
bottomShadowBorderBottom: '1px dashed #316d7b',
112+
headerShadow: '0px 6px 4px 0px rgba(0,0,0,0.2)',
113+
headerShadowBorderBottom: '1px dashed #316d7b',
114+
footerShadow: '-1px -4px 4px 0px rgba(0,0,0,0.2)',
115+
footerShadowBorderBottom: '1px dashed #316d7b',
116116

117117
searchInputBottom: '#2b6775',
118118
searchInputBottomActive: '#61ABB2',

utils/themes/skins/github.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ const github = {
110110
pinActive: 'yellowgreen',
111111
menuLink: '#D9E6E5',
112112
borderColor: '#14363E',
113-
topShadow: '0px 6px 4px 0px rgba(0,0,0,0.2)',
114-
topShadowBorderBottom: '1px dashed #3d5a51',
113+
headerShadow: '0px 6px 4px 0px rgba(0,0,0,0.2)',
114+
headerShadowBorderBottom: '1px dashed #3d5a51',
115115
searchInputBottom: '#3A3948',
116116
searchInputBottomActive: '#3B8250',
117117
searchInputHolder: '#3B3948',

utils/themes/skins/green.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ const green = {
111111
pinActive: 'yellowgreen',
112112
menuLink: '#A6BBAF',
113113
borderColor: lighten(0.05, sidebarBg),
114-
topShadow: '-2px 2px 2px 0px rgb(39, 53, 45)',
115-
topShadowBorderBottom: '1px solid #576957',
114+
headerShadow: '-2px 2px 2px 0px rgb(39, 53, 45)',
115+
headerShadowBorderBottom: '1px solid #576957',
116116
searchInputBottom: '#606f64',
117117
searchInputBottomActive: '#92C446',
118118
searchInputHolder: '#607765',

utils/themes/skins/iron_green.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ const iconGreen = {
109109
pinActive: '#BFE4B4',
110110
menuLink: '#F0F9F8',
111111
borderColor: '#14363E',
112-
topShadow: '-1px 6px 2px 0px rgb(9, 171, 165)',
113-
topShadowBorderBottom: '1px solid #668d90',
112+
headerShadow: '-1px 6px 2px 0px rgb(9, 171, 165)',
113+
headerShadowBorderBottom: '1px solid #668d90',
114114
searchInputBottom: '#8ED5B4',
115115
searchInputBottomActive: '#BFE4B4',
116116
searchInputHolder: '#8ED5B4',

utils/themes/skins/monokai.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ const monokai = {
112112
pinActive: '#AA9862',
113113
menuLink: '#93A1A1',
114114
borderColor: lighten(0.05, sidebarBg),
115-
topShadow: '-2px 1px 6px 0px rgb(1,21,25)',
116-
topShadowBorderBottom: '1px solid #6b5f34',
115+
headerShadow: '-2px 1px 6px 0px rgb(1,21,25)',
116+
headerShadowBorderBottom: '1px solid #6b5f34',
117117
searchInputBottom: '#3A3948',
118118
searchInputBottomActive: '#877853',
119119
searchInputHolder: '#3B3948',

utils/themes/skins/purple.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ const purple = {
110110
pinActive: '#92584a',
111111
menuLink: '#9a96b1',
112112
borderColor: lighten(0.05, sidebarBg),
113-
topShadow: '-2px 1px 6px 0px rgb(1,21,25)',
114-
topShadowBorderBottom: '1px solid #615b79',
113+
headerShadow: '-2px 1px 6px 0px rgb(1,21,25)',
114+
headerShadowBorderBottom: '1px solid #615b79',
115115
searchInputBottom: '#3A3948',
116116
searchInputBottomActive: '#5F5C75',
117117
searchInputHolder: '#3B3948',

utils/themes/skins/solarized_dark.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ const solarizedDark = {
111111
pinActive: '#227B7F',
112112
menuLink: '#7e98a9',
113113
borderColor: '#14363E',
114-
topShadow: '-2px 1px 6px 0px rgb(1,21,25)',
115-
topShadowBorderBottom: '1px solid #06495a',
114+
headerShadow: '-2px 1px 6px 0px rgb(1,21,25)',
115+
headerShadowBorderBottom: '1px solid #06495a',
116116
searchInputBottom: '#154964',
117117
searchInputBottomActive: '#2e78a4',
118118
searchInputHolder: '#17414E',

utils/themes/skins/yellow.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ const yellow = {
110110
pinActive: '#D48367',
111111
menuLink: '#cec3b6',
112112
borderColor: lighten(0.05, sidebarBg),
113-
topShadow: '0px 6px 4px 0px rgba(0,0,0,0.2)',
114-
topShadowBorderBottom: '1px dashed #88755b',
113+
headerShadow: '0px 6px 4px 0px rgba(0,0,0,0.2)',
114+
headerShadowBorderBottom: '1px dashed #88755b',
115115
searchInputBottom: '#5D4833',
116116
searchInputBottomActive: '#A4644B',
117117
searchInputHolder: '#5D4833',

0 commit comments

Comments
 (0)