/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ import { Header, SpaceBetween, Button, ButtonDropdown, } from '@awsui/components-react'; import React from "react"; // Table header content, shows how many items are selected and contains the action stripe const TableHeader = ({ title, description, selectedItems, counter, handleRefreshClick, handleDeleteClick, handleEditClick, handleAddClick, handleActionSelection, actionItems, handleDownload, actionsButtonDisabled, disabledButtons, info}) => { const isOnlyOneSelected = selectedItems ? selectedItems.length === 1 : false; const disableActionsButton = actionsButtonDisabled !== undefined ? actionsButtonDisabled : !isOnlyOneSelected function isButtonDisabled(buttonName){ if (disabledButtons && disabledButtons[buttonName]){ return disabledButtons[buttonName]; } else { return false; } } return (
{handleRefreshClick ? : null} {handleDeleteClick ? : null} {handleAddClick ? : null} {handleDownload ?
); }; export default TableHeader;