-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add separate search facets dialog, add small breakpoint facet l…
…ayout
- Loading branch information
Showing
12 changed files
with
260 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import {Box, Dialog} from '@sanity/ui' | ||
import React, {FC, useCallback} from 'react' | ||
import {useDispatch} from 'react-redux' | ||
|
||
import {dialogClear} from '../../modules/dialog' | ||
import SearchFacets from '../SearchFacets' | ||
import SearchFacetsControl from '../SearchFacetsControl' | ||
|
||
const DialogSearchFacets: FC = () => { | ||
// Redux | ||
const dispatch = useDispatch() | ||
|
||
// Callbacks | ||
const handleClose = useCallback(() => { | ||
dispatch(dialogClear()) | ||
}, []) | ||
|
||
return ( | ||
<Dialog scheme="dark" header="Filters" id="example" onClose={handleClose} width={1}> | ||
<Box padding={3}> | ||
<SearchFacets layout="stack" /> | ||
<SearchFacetsControl /> | ||
</Box> | ||
</Dialog> | ||
) | ||
} | ||
|
||
export default DialogSearchFacets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.