Animate filter menu in from bottom
This commit is contained in:
@ -14,7 +14,6 @@ export function CloseButton(props: CloseButtonProps): JSX.Element {
|
||||
<Box
|
||||
css={{
|
||||
display: 'flex',
|
||||
marginLeft: 'auto',
|
||||
height: '20px',
|
||||
width: '20px',
|
||||
alignItems: 'center',
|
||||
|
||||
@ -748,27 +748,16 @@ function HomeFeedGrid(props: HomeFeedContentProps): JSX.Element {
|
||||
setShowFilterMenu={setShowFilterMenu}
|
||||
/>
|
||||
<HStack css={{ width: '100%', height: '100%' }}>
|
||||
<SpanBox
|
||||
css={{
|
||||
display: 'block',
|
||||
bg: 'red',
|
||||
'@mdDown': {
|
||||
opacity: showFilterMenu ? '1.0' : '0.0',
|
||||
visibility: showFilterMenu ? 'visible' : 'hidden',
|
||||
},
|
||||
transition: 'visibility 0s, opacity 0.3s',
|
||||
<LibraryFilterMenu
|
||||
setShowAddLinkModal={props.setShowAddLinkModal}
|
||||
searchTerm={props.searchTerm}
|
||||
applySearchQuery={(searchQuery: string) => {
|
||||
console.log('searching with searchQuery: ', searchQuery)
|
||||
props.applySearchQuery(searchQuery)
|
||||
}}
|
||||
>
|
||||
<LibraryFilterMenu
|
||||
setShowAddLinkModal={props.setShowAddLinkModal}
|
||||
searchTerm={props.searchTerm}
|
||||
applySearchQuery={(searchQuery: string) => {
|
||||
console.log('searching with searchQuery: ', searchQuery)
|
||||
props.applySearchQuery(searchQuery)
|
||||
}}
|
||||
setShowFilterMenu={setShowFilterMenu}
|
||||
/>
|
||||
</SpanBox>
|
||||
showFilterMenu={showFilterMenu}
|
||||
setShowFilterMenu={setShowFilterMenu}
|
||||
/>
|
||||
<VStack
|
||||
alignment="center"
|
||||
css={{
|
||||
|
||||
@ -19,6 +19,7 @@ type LibraryFilterMenuProps = {
|
||||
searchTerm: string | undefined
|
||||
applySearchQuery: (searchTerm: string) => void
|
||||
|
||||
showFilterMenu: boolean
|
||||
setShowFilterMenu: (show: boolean) => void
|
||||
}
|
||||
|
||||
@ -40,27 +41,29 @@ export function LibraryFilterMenu(props: LibraryFilterMenuProps): JSX.Element {
|
||||
display: 'none',
|
||||
},
|
||||
'@mdDown': {
|
||||
top: '50px',
|
||||
top: props.showFilterMenu ? '0px' : '100%',
|
||||
width: '100%',
|
||||
zIndex: 6, // Above the header
|
||||
transform: 'translateY(0)',
|
||||
transitionDuration: '200ms',
|
||||
},
|
||||
transform: 'translateX(0)',
|
||||
}}
|
||||
>
|
||||
{/* <Box
|
||||
<HStack
|
||||
css={{
|
||||
width: '100%',
|
||||
height: '30px',
|
||||
py: '15px',
|
||||
px: '15px',
|
||||
marginLeft: 'auto',
|
||||
'@md': {
|
||||
display: 'none',
|
||||
},
|
||||
}}
|
||||
distribution="start"
|
||||
>
|
||||
<MenuHeaderButton setShowFilterMenu={props.setShowFilterMenu} />
|
||||
<CloseButton close={() => props.setShowFilterMenu(false)} />
|
||||
</Box> */}
|
||||
</HStack>
|
||||
<SavedSearches {...props} />
|
||||
<Subscriptions {...props} />
|
||||
<Labels {...props} />
|
||||
|
||||
Reference in New Issue
Block a user