github.com/replicatedhq/ship@v0.55.0/web/init/src/components/shared/RenderActions.jsx (about)

     1  import * as React from "react";
     2  
     3  const RenderActions = ({ actions, handleAction, isLoading }) => (
     4    <div>
     5      {!actions ? null : actions.map(
     6        (action, index) => {
     7          return (
     8            <button
     9              key={index}
    10              className={`btn ${action.buttonType}`}
    11              onClick={() => handleAction(action, true)}
    12              disabled={isLoading}>{isLoading ? action.loadingText : action.text}
    13            </button>
    14          );
    15        }
    16      )}
    17    </div>
    18  );
    19  
    20  export default RenderActions;