/* * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ import { EuiButton, EuiSpacer, EuiText } from "@elastic/eui"; import React from "react"; import { Modal } from "../../components/Modal"; export const ErrorToastContentForJob = (props: { shortError?: React.ReactChild; fullError?: React.ReactChild }) => { const { shortError = null, fullError } = props; return (
{shortError}
{fullError ? ( <> { Modal.show({ locale: { ok: "Close", }, title: shortError || "", content: (
{fullError}
), }); } } style={{ float: "right" }} color="danger" > See full error
) : null}
); };