laconic-wallet/components/Section.tsx
shreerang6921 3d40de966d
Generate wallet and sign message (#4)
* 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>
2024-02-08 18:42:30 +05:30

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 };