META-INF.resources.js.components.APIApplicationManagementToolbar.tsx Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of com.liferay.headless.builder.web
Show all versions of com.liferay.headless.builder.web
Liferay Headless Builder Web
The newest version!
/**
* SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
*/
import ClayButton from '@clayui/button';
import ClayManagementToolbar from '@clayui/management-toolbar';
import React from 'react';
import StatusLabel from './StatusLabel';
interface APIApplicationManagementToolbarProps {
applicationStatusKey: 'published' | 'unpublished';
hideManagementButtons: boolean;
managementButtonsProps: ManagementButtonsProps;
title: string;
}
export function APIApplicationManagementToolbar({
applicationStatusKey,
hideManagementButtons,
managementButtonsProps: buttons,
title,
}: APIApplicationManagementToolbarProps) {
return (
<>
{title}
{!hideManagementButtons && (
{buttons.cancel.visible && (
{Liferay.Language.get('cancel')}
)}
{buttons.save.visible && (
{Liferay.Language.get('save')}
)}
{buttons.publish.visible && (
{Liferay.Language.get('publish')}
)}
)}
>
);
}