webpack/components/common/LockTableEntry.js in foreman_acd-0.9.7 vs webpack/components/common/LockTableEntry.js in foreman_acd-0.10.0

- old
+ new

@@ -1,19 +1,16 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { - Icon, - Button, -} from 'patternfly-react'; +import { Icon, Button } from 'patternfly-react'; import { translate as __ } from 'foremanReact/common/I18n'; const LockTableEntry = ({ hidden, disabled, onLockTableEntry, additionalData, -}) =>{ +}) => { if (hidden) { return null; } let lockButton; @@ -40,11 +37,11 @@ return ( <span> <Button bsStyle="default" disabled={disabled} - onClick={() => onLockTableEntry(additionalData) } + onClick={() => onLockTableEntry(additionalData)} > <Icon type="pf" name={lockButton} title={__(lockButtonTitle)} /> </Button> </span> ); @@ -53,8 +50,11 @@ LockTableEntry.propTypes = { hidden: PropTypes.bool, disabled: PropTypes.bool.isRequired, onLockTableEntry: PropTypes.func.isRequired, additionalData: PropTypes.object.isRequired, +}; +LockTableEntry.defaultProps = { + hidden: false, }; export default LockTableEntry;