-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/framework_migration_prep' into…
… More-Profile-Migrations
- Loading branch information
Showing
43 changed files
with
534 additions
and
2,285 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
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,56 @@ | ||
import React from "react"; | ||
import { View, StyleSheet } from "react-native"; | ||
import color from "color"; | ||
import { Button, IconButton, useTheme } from "react-native-paper"; | ||
|
||
const NavBarButton = ({ children, icon, onPressAction }) => { | ||
|
||
const { colors } = useTheme(); | ||
const buttonColor = color(colors.onBackground).alpha(.07).rgb().string(); | ||
const outlineColor = color(colors.onBackground).alpha(.2).rgb().string(); | ||
|
||
return (<> | ||
<Button mode="outlined" buttonColor={buttonColor} textColor={colors.onBackground} | ||
contentStyle={{ flexDirection: 'row', height: 36 }} | ||
style={[s.btn, {borderColor: outlineColor}]} | ||
labelStyle={s.label} onPress={() => onPressAction()}> | ||
<View style={s.textWrapper}> | ||
{children} | ||
</View> | ||
{icon && | ||
<View> | ||
<IconButton icon={icon} color={colors.onBackground} size={20} | ||
style={s.icon} /> | ||
</View> | ||
} | ||
</Button> | ||
</>); | ||
}; | ||
|
||
export const s = StyleSheet.create({ | ||
btn: { | ||
borderRadius: 10, | ||
marginLeft: 5, | ||
}, | ||
label: { | ||
fontSize: 12.5, | ||
fontWeight: '400', | ||
height: '100%', | ||
marginHorizontal: 'auto', | ||
marginVertical: 'auto', | ||
display: 'flex', | ||
}, | ||
icon: { | ||
margin: 'auto', | ||
width: 'auto', | ||
height: 'auto', | ||
}, | ||
textWrapper: { | ||
lineHeight: '100%', | ||
marginHorizontal: 5, | ||
justifyContent: 'space-evenly', | ||
alignItems: 'center', | ||
}, | ||
}); | ||
|
||
export default NavBarButton; |
Oops, something went wrong.