BlueWallet/screen/wallets/xpub.styles.ts
Marcos Rodriguez Velez 6aed1a4e93
REF: useMemo
2024-02-06 20:20:02 -04:00

43 lines
945 B
TypeScript

import { StyleSheet } from 'react-native';
import { useTheme } from '../../components/themes';
import { useMemo } from 'react';
export const styles = StyleSheet.create({
root: {
flex: 1,
paddingTop: 20,
},
container: {
alignItems: 'center',
flex: 1,
justifyContent: 'center',
},
share: {
alignSelf: 'center',
width: '40%',
},
});
export const useDynamicStyles = () => {
const theme = useTheme();
const stylesHook = useMemo(
() =>
StyleSheet.create({
root: {
backgroundColor: theme.colors.elevated,
// Add more dynamic styles as needed
},
container: {
// Example of another dynamic style
borderColor: theme.colors.inputBorderColor,
borderWidth: 1,
},
// You can add more dynamically themed styles here
}),
[theme],
); // Recompute styles only when theme changes
return stylesHook;
};