Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused propType for CollapsibleSection #4386

Merged
merged 2 commits into from
Aug 11, 2021
Merged
Show file tree
Hide file tree
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

This file was deleted.

13 changes: 10 additions & 3 deletions src/components/CollapsibleSection/index.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
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, defaultProps} 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);
this.toggleSection = this.toggleSection.bind(this);
this.state = {
isExpanded: this.props.isExpanded,
isExpanded: false,
};
}

Expand Down Expand Up @@ -48,6 +56,5 @@ class CollapsibleSection extends React.Component {
}
}

CollapsibleSection.defaultProps = defaultProps;
CollapsibleSection.propTypes = propTypes;
export default CollapsibleSection;