UNPKG

@keycloakify/keycloak-admin-ui

Version:
9 lines 991 B
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime"; import { CodeBlock, CodeBlockAction, EmptyState, EmptyStateBody, EmptyStateHeader, TextArea, } from "@patternfly/react-core"; import { useTranslation } from "react-i18next"; import { CopyToClipboardButton } from "../../clients/scopes/CopyToClipboardButton"; export const GeneratedCodeTab = ({ text, user, label, }) => { const { t } = useTranslation(); return user ? (_jsx(CodeBlock, { id: label, actions: _jsx(CodeBlockAction, { children: _jsx(CopyToClipboardButton, { id: "code", text: text, label: label }) }), children: _jsx(TextArea, { id: `text-area-${label}`, rows: 20, value: text, "aria-label": label }) })) : (_jsxs(EmptyState, { variant: "lg", id: label, children: [_jsx(EmptyStateHeader, { titleText: _jsx(_Fragment, { children: t(`${label}No`) }), headingLevel: "h2" }), _jsx(EmptyStateBody, { children: t(`${label}IsDisabled`) })] })); }; //# sourceMappingURL=GeneratedCodeTab.js.map