// Copyright 2022 Amazon.com and its affiliates; all rights reserved. // SPDX-License-Identifier: MIT No Attribution import {Box, Button, Header, Link, SpaceBetween} from "@cloudscape-design/components"; import React from "react"; import {getHeaderCounterText, getServerHeaderCounterText} from "../../common/tableCounterStrings"; import {InfoLink} from "./links"; export const TableHeader = props => { return ( } description={props.description} actions={props.actionButtons} > {props.title} ); }; function getCounter(props) { if (props.counter) { return props.counter; } if (!props.totalItems) { return null; } if (props.serverSide) { return getServerHeaderCounterText(props.totalItems, props.selectedItems); } return getHeaderCounterText(props.totalItems, props.selectedItems); } export const TableEmptyState = ({ resourceName }) => ( No {resourceName.toLowerCase()}s No {resourceName.toLowerCase()}s associated with this resource. Create {resourceName.toLowerCase()} ); export const TableNoMatchState = props => ( No matches We can't find a match. Clear filter ); export const CounterLink = ({ children }) => { return ( {children} ); };