forked from BlueWallet/BlueWallet
-
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.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
14 changed files
with
111 additions
and
94 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,27 @@ | ||
import React from 'react'; | ||
import { ImageBackground, StyleSheet, View } from 'react-native'; | ||
import { StyleSheet, View } from 'react-native'; | ||
import { Icon } from '@rneui/themed'; | ||
|
||
export const BlurredBalanceView = () => { | ||
return ( | ||
<View style={styles.container}> | ||
{/* @ts-ignore: We just want the blur effect. No source prop needed */} | ||
<ImageBackground blurRadius={6} style={styles.background} /> | ||
<View style={styles.background} /> | ||
<Icon name="eye-slash" type="font-awesome" color="#FFFFFF" /> | ||
</View> | ||
); | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
container: { flexDirection: 'row', alignItems: 'center', borderRadius: 9 }, | ||
background: { backgroundColor: '#FFFFFF', opacity: 0.5, height: 30, width: 110, marginRight: 8, borderRadius: 9 }, | ||
container: { | ||
flexDirection: 'row', | ||
alignItems: 'center', | ||
borderRadius: 9, | ||
}, | ||
background: { | ||
backgroundColor: 'rgba(255, 255, 255, 0.5)', | ||
height: 30, | ||
width: 110, | ||
marginRight: 8, | ||
borderRadius: 9, | ||
}, | ||
}); |
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,31 @@ | ||
import React from 'react'; | ||
import ToolTipMenu from './TooltipMenu'; | ||
import { useTheme } from './themes'; | ||
import { Icon } from '@rneui/themed'; | ||
import { Platform } from 'react-native'; | ||
import { Action } from './types'; | ||
|
||
interface HeaderMenuButtonProps { | ||
onPressMenuItem: (id: string) => void; | ||
actions: Action[]; | ||
disabled?: boolean; | ||
} | ||
|
||
const HeaderMenuButton: React.FC<HeaderMenuButtonProps> = ({ onPressMenuItem, actions, disabled }) => { | ||
const { colors } = useTheme(); | ||
const styleProps = Platform.OS === 'android' ? { iconStyle: { transform: [{ rotate: '90deg' }] } } : {}; | ||
return ( | ||
<ToolTipMenu | ||
testID="HeaderMenuButton" | ||
disabled={disabled} | ||
isButton | ||
isMenuPrimaryAction | ||
onPressMenuItem={onPressMenuItem} | ||
actions={actions} | ||
> | ||
<Icon size={22} name="more-horiz" type="material" color={colors.foregroundColor} {...styleProps} /> | ||
</ToolTipMenu> | ||
); | ||
}; | ||
|
||
export default HeaderMenuButton; |
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,13 @@ | ||
import { useEffect, useRef } from 'react'; | ||
import { LayoutAnimation } from 'react-native'; | ||
|
||
const useAnimateOnChange = <T>(value: T) => { | ||
const prevValue = useRef<T | undefined>(undefined); | ||
useEffect(() => { | ||
if (prevValue.current !== undefined && prevValue.current !== value) { | ||
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut); | ||
} | ||
prevValue.current = value; | ||
}, [value]); | ||
}; | ||
export default useAnimateOnChange; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Oops, something went wrong.