mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-25 16:09:42 +01:00
feat: add unselect all
This commit is contained in:
@@ -81,6 +81,7 @@ export default class Navigator {
|
||||
const NavigationContainer = props => {
|
||||
const openSideMenu = useStore(store => store.openSideMenu);
|
||||
const isSelectionMode = useStore(store => store.isSelectionMode);
|
||||
const exitSelectionMode = useStore(store => store.exitSelectionMode);
|
||||
return (
|
||||
<ThemeProvider>
|
||||
<Flex flexDirection="column" px={2}>
|
||||
@@ -131,9 +132,20 @@ const NavigationContainer = props => {
|
||||
)}
|
||||
</Flex>
|
||||
)}
|
||||
<Text variant="title" color="primary">
|
||||
{props.route.params.subtitle}
|
||||
</Text>
|
||||
{(props.route.params.subtitle || isSelectionMode) && (
|
||||
<Text
|
||||
variant="title"
|
||||
color="primary"
|
||||
onClick={() => exitSelectionMode()}
|
||||
sx={{
|
||||
marginBottom: 2,
|
||||
cursor: isSelectionMode ? "pointer" : "normal"
|
||||
}}
|
||||
>
|
||||
{props.route.params.subtitle}
|
||||
{isSelectionMode && "\nUnselect All"}
|
||||
</Text>
|
||||
)}
|
||||
</Flex>
|
||||
{props.route.component && (
|
||||
<props.route.component navigator={props.navigator} {...props.params} />
|
||||
|
||||
Reference in New Issue
Block a user