diff --git a/src/components/WalletSection.js b/src/components/WalletSection.tsx similarity index 60% rename from src/components/WalletSection.js rename to src/components/WalletSection.tsx index 1b5349098b82..c0c02877828e 100644 --- a/src/components/WalletSection.js +++ b/src/components/WalletSection.tsx @@ -1,29 +1,21 @@ -import PropTypes from 'prop-types'; import React from 'react'; +import {SvgProps} from 'react-native-svg'; import useThemeStyles from '@styles/useThemeStyles'; +import ChildrenProps from '@src/types/utils/ChildrenProps'; import Section from './Section'; -const propTypes = { - /** Contents to display inside the section */ - children: PropTypes.node, - +type WalletSectionProps = ChildrenProps & { /** The icon to display along with the title */ - icon: PropTypes.func, + icon: React.FC; /** The text to display in the subtitle of the section */ - subtitle: PropTypes.string, + subtitle: string; /** The text to display in the title of the section */ - title: PropTypes.string.isRequired, -}; - -const defaultProps = { - children: null, - icon: null, - subtitle: null, + title: string; }; -function WalletSection({children, icon, subtitle, title}) { +function WalletSection({children, icon, subtitle, title}: WalletSectionProps) { const styles = useThemeStyles(); return (