forked from cerc-io/laconic-wallet
* Store mnemonic and private key seperately * Change variable names * Refactor code in seperate components * Display wallet details * Remove unnecessary imports * Make review changes * Add method to reset wallet * Make component self closing * separate imports --------- Co-authored-by: Adw8 <adwait@deepstacksoft.com>
30 lines
731 B
TypeScript
30 lines
731 B
TypeScript
import { PropsWithChildren } from "react";
|
|
import { Text, View, useColorScheme } from "react-native";
|
|
import { Colors } from "react-native/Libraries/NewAppScreen";
|
|
|
|
import styles from "../styles/stylesheet";
|
|
|
|
type SectionProps = PropsWithChildren<{
|
|
title: string;
|
|
}>;
|
|
|
|
const Section = ({ children, title }: SectionProps): React.JSX.Element => {
|
|
const isDarkMode = useColorScheme() === 'dark';
|
|
return (
|
|
<View style={styles.sectionContainer}>
|
|
<Text
|
|
style={[
|
|
styles.sectionTitle,
|
|
{
|
|
color: isDarkMode ? Colors.white : Colors.black,
|
|
},
|
|
]}>
|
|
{title}
|
|
<Text style={styles.sectionDescription} />
|
|
</Text>
|
|
</View>
|
|
);
|
|
};
|
|
|
|
export { Section };
|