content: import React from 'react';
  import PropTypes from 'prop-types';
  
  import ActivityMenu from '@ciscospark/react-component-activity-menu';
  
  export default function SpaceActivityMenu({
    activityTypes,
    onChange,
    onExit
  }) {
  
    function handleChange(activity) {
      return () => onChange(activity);
    }
  
    const buttons = activityTypes.toJS().map((a) => ({
      label: a.displayName,
      buttonClassName: a.buttonClassName,
      iconType: a.iconClassName,
      onClick: handleChange(a.name)
    }));
  
    return (
      <ActivityMenu
        buttons={buttons}
        onExit={onExit}
      />
    );
  }
  
  SpaceActivityMenu.propTypes = {
    activityTypes: PropTypes.object,
    onChange: PropTypes.func,
    onExit: PropTypes.func
  };
  