forked from fga-eps-mds/2023-2-GEROcuidado-Front
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#132) componentiza backButton e altera navegacao
- Loading branch information
1 parent
c9337c9
commit dd0c5bd
Showing
5 changed files
with
37 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { | ||
Pressable, | ||
StyleSheet, | ||
} from 'react-native'; | ||
import { router } from 'expo-router'; | ||
import Icon from "react-native-vector-icons/MaterialCommunityIcons"; | ||
|
||
interface IProps { | ||
canGoBack?: boolean | ||
} | ||
|
||
export function BackButton({ canGoBack = true }: IProps) { | ||
const goBack = () => canGoBack ? router.back() : false; | ||
|
||
return ( | ||
<Pressable onPress={goBack}> | ||
<Icon name="chevron-left" size={40} /> | ||
</Pressable> | ||
); | ||
}; |
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