Skip to content

Commit

Permalink
remove duplicated proptype
Browse files Browse the repository at this point in the history
  • Loading branch information
calintamas committed Jan 7, 2021
1 parent a4c54f4 commit 2a15660
Showing 1 changed file with 12 additions and 24 deletions.
36 changes: 12 additions & 24 deletions src/expandable/expandable.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,37 +37,25 @@ const Expandable = ({
);
};

const layoutAnimationPropType = PropTypes.shape({
type: PropTypes.string,
property: PropTypes.string,
springDamping: PropTypes.number,
initialVelocity: PropTypes.number,
delay: PropTypes.number,
duration: PropTypes.number
});

Expandable.propTypes = {
initialState: PropTypes.bool,
renderHeader: PropTypes.func,
onShow: PropTypes.func,
onHide: PropTypes.func,
layoutAnimationPreset: PropTypes.shape({
duration: PropTypes.number,
create: PropTypes.shape({
type: PropTypes.string,
property: PropTypes.string,
springDamping: PropTypes.number,
initialVelocity: PropTypes.number,
delay: PropTypes.number,
duration: PropTypes.number
}),
update: PropTypes.shape({
type: PropTypes.string,
property: PropTypes.string,
springDamping: PropTypes.number,
initialVelocity: PropTypes.number,
delay: PropTypes.number,
duration: PropTypes.number
}),
delete: PropTypes.shape({
type: PropTypes.string,
property: PropTypes.string,
springDamping: PropTypes.number,
initialVelocity: PropTypes.number,
delay: PropTypes.number,
duration: PropTypes.number
})
create: layoutAnimationPropType,
update: layoutAnimationPropType,
delete: layoutAnimationPropType
})
};

Expand Down

0 comments on commit 2a15660

Please sign in to comment.