From 994f44ba1cec13f62b0dd3f3389a4dbedc97ddf9 Mon Sep 17 00:00:00 2001 From: Joe Gambino Date: Thu, 5 Aug 2021 10:51:57 -0700 Subject: [PATCH] remove unnecessary propTypes file --- .../CollapsibleSection/CollapsibleSectionPropTypes.js | 11 ----------- src/components/CollapsibleSection/index.js | 10 +++++++++- 2 files changed, 9 insertions(+), 12 deletions(-) delete mode 100644 src/components/CollapsibleSection/CollapsibleSectionPropTypes.js diff --git a/src/components/CollapsibleSection/CollapsibleSectionPropTypes.js b/src/components/CollapsibleSection/CollapsibleSectionPropTypes.js deleted file mode 100644 index 2fe358f66078..000000000000 --- a/src/components/CollapsibleSection/CollapsibleSectionPropTypes.js +++ /dev/null @@ -1,11 +0,0 @@ -import PropTypes from 'prop-types'; - -const propTypes = { - /** Title of the Collapsible section */ - title: PropTypes.string.isRequired, - - /** Children to display inside the Collapsible component */ - children: PropTypes.node.isRequired, -}; - -export default propTypes; diff --git a/src/components/CollapsibleSection/index.js b/src/components/CollapsibleSection/index.js index ca6bbb022228..b30cb5b0122a 100644 --- a/src/components/CollapsibleSection/index.js +++ b/src/components/CollapsibleSection/index.js @@ -1,12 +1,20 @@ import React from 'react'; import {View, TouchableOpacity} from 'react-native'; +import PropTypes from 'prop-types'; import Collapsible from './Collapsible'; import Text from '../Text'; -import propTypes from './CollapsibleSectionPropTypes'; import styles from '../../styles/styles'; import Icon from '../Icon'; import {DownArrow, UpArrow} from '../Icon/Expensicons'; +const propTypes = { + /** Title of the Collapsible section */ + title: PropTypes.string.isRequired, + + /** Children to display inside the Collapsible component */ + children: PropTypes.node.isRequired, +}; + class CollapsibleSection extends React.Component { constructor(props) { super(props);