Skip to content

Commit

Permalink
minor linting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
shivrajkumar committed Jan 8, 2021
1 parent ee12a25 commit 3c2c16d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"node_modules/(?!react-native|@shoutem|react-clone-referenced-element|native-base-shoutem-theme)"
]
},
"version": "2.15.0",
"version": "2.15.1",
"license": "Apache-2.0",
"private": false,
"dependencies": {
Expand Down
9 changes: 4 additions & 5 deletions src/basic/Accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ class DefaultHeader extends React.Component {
: { color: variables.expandedIconStyle }
: icon && iconStyle
? iconStyle
: { color: disable ? variable.disableRow : variables.iconStyle },

: { color: disable ? variable.disableRow : variables.iconStyle }
]}
name={
expanded ? expandedIcon || 'ios-arrow-up' : icon || 'ios-arrow-down'
Expand Down Expand Up @@ -175,13 +174,14 @@ export class Accordion extends React.Component {
super(props);

const { expanded, expandMultiple } = this.props;
// eslint-disable-next-line no-unused-vars
let selected;
if (expanded !== undefined && expanded !== null) {
selected = Array.isArray(expanded) ? expanded : [expanded];
selected = expandMultiple ? selected : selected.slice(0, 1);
}
this.state = {
selected: props.expanded,
selected: props.expanded
};
}

Expand Down Expand Up @@ -230,7 +230,7 @@ export class Accordion extends React.Component {
keyExtractor={(item, index) => String(index)}
renderItem={({ item, index }) => (
<AccordionItem
disable={disable == index ? true : false}
disable={disable === index}
key={String(index)}
item={item}
expanded={this.state.selected.indexOf(index) !== -1}
Expand All @@ -246,7 +246,6 @@ export class Accordion extends React.Component {
expandedIconStyle={expandedIconStyle}
onAccordionOpen={onAccordionOpen}
onAccordionClose={onAccordionClose}
setSelected={(i) => this.setSelected(i)}
/>
)}
{...this.props}
Expand Down
9 changes: 5 additions & 4 deletions src/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ import PropTypes from 'prop-types';
import InteractionManager from './interactionManager';

const ViewPropTypes = {
style: PropTypes.shape({
style: PropTypes.any,
})
}
style: PropTypes.shape({
// eslint-disable-next-line react/forbid-prop-types
style: PropTypes.any
})
};
export { InteractionManager, ViewPropTypes };

0 comments on commit 3c2c16d

Please sign in to comment.