@backstage/plugin-techdocs
Version:
The Backstage plugin that renders technical documentation for your components
26 lines (23 loc) • 1.05 kB
JavaScript
import { jsx, Fragment } from 'react/jsx-runtime';
import { PageWithHeader } from '@backstage/core-components';
import { useApi, configApiRef } from '@backstage/core-plugin-api';
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
import { techdocsTranslationRef } from '../../translation.esm.js';
const TechDocsPageWrapper = (props) => {
const { children, CustomPageWrapper } = props;
const configApi = useApi(configApiRef);
const { t } = useTranslationRef(techdocsTranslationRef);
const orgName = configApi.getOptionalString("organization.name") ?? "Backstage";
const generatedSubtitle = t("pageWrapper.subtitle", { orgName });
return /* @__PURE__ */ jsx(Fragment, { children: CustomPageWrapper ? /* @__PURE__ */ jsx(CustomPageWrapper, { children }) : /* @__PURE__ */ jsx(
PageWithHeader,
{
title: t("pageWrapper.title"),
subtitle: generatedSubtitle,
themeId: "documentation",
children
}
) });
};
export { TechDocsPageWrapper };
//# sourceMappingURL=TechDocsPageWrapper.esm.js.map