Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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<SvgProps>;

/** 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) {
Comment thread
pac-guerreiro marked this conversation as resolved.
const styles = useThemeStyles();
return (
<Section
Expand All @@ -39,8 +31,6 @@ function WalletSection({children, icon, subtitle, title}) {
);
}

WalletSection.defaultProps = defaultProps;
WalletSection.displayName = 'WalletSection';
WalletSection.propTypes = propTypes;

export default WalletSection;