content: import React from 'react';
  import { connect } from 'react-redux';
  
  import { selectors as attributesSelectors } from '../../reducers/attributes';
  import './styles.css';
  
  const SaveButton = ({ attributes }) => {
    const isDisabled = attributes.some(a => !a.valid);
    return (
      <div className="buttons">
        <button type="button" className="btn btn-success" disabled={isDisabled}>
          Save
        </button>
      </div>
    );
  };
  
  const mapStateToProps = (state, ownProps) => {
    const attributes = attributesSelectors(state);
    return {
      attributes: attributes.getAllAttributes()
    };
  };
  
  export default connect(mapStateToProps, {})(SaveButton);
  