import { Button } from "@dashboard/components/Button"; import Hr from "@dashboard/components/Hr"; import { AppInstallationFragment } from "@dashboard/graphql"; import { buttonMessages } from "@dashboard/intl"; import { appInstallationStatusMessages } from "@dashboard/new-apps/messages"; import { CardActions, Typography } from "@material-ui/core"; import React from "react"; import { FormattedMessage } from "react-intl"; import InstallErrorAction from "./ErrorInstallAction"; import { messages } from "./messages"; import { useActionsStyles } from "./styles"; interface AppListCardActionsProps { releaseDate: string | undefined; installationPending?: boolean; appInstallation?: AppInstallationFragment; installHandler?: () => void; githubForkHandler?: () => void; retryInstallHandler?: () => void; removeInstallHandler?: () => void; } const AppListCardActions: React.FC = ({ releaseDate, installationPending = false, appInstallation, installHandler, githubForkHandler, retryInstallHandler, removeInstallHandler, }) => { const classes = useActionsStyles(); if ( !installHandler && !githubForkHandler && !releaseDate && !retryInstallHandler && !removeInstallHandler && !installationPending ) { return null; } return ( <>
{githubForkHandler && ( )} {installHandler && ( )} {installationPending && ( )} {releaseDate && ( )} ); }; AppListCardActions.displayName = "AppListCardActions"; export default AppListCardActions;