feat(docs): migrate documentation site into monorepo (#5912)
This commit is contained in:
1 parent
3e464a76f2
commit
9e421c67bd
605 files changed
+26764
-219
No files matched your search
@@ -0,0 +1,28 @@
|
||||
import { IntegrationDefinition } from "@site/src/types";
|
||||
import { DocsHeader } from "../ui/header";
|
||||
import { useColorMode } from "@docusaurus/theme-common";
|
||||
|
||||
interface IntegrationHeaderProps {
|
||||
integration: IntegrationDefinition;
|
||||
categories: string[];
|
||||
}
|
||||
|
||||
export const IntegrationHeader = (props: IntegrationHeaderProps) => {
|
||||
const { isDarkTheme } = useColorMode();
|
||||
|
||||
return (
|
||||
<DocsHeader
|
||||
title={props.integration.name}
|
||||
description={props.integration.description}
|
||||
icon={<img src={getIntegrationIconUrl(props.integration, isDarkTheme)} width={48} height={48} />}
|
||||
categories={props.categories}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export const getIntegrationIconUrl = (integration: IntegrationDefinition, isDarkTheme: boolean): string =>
|
||||
typeof integration.iconUrl === "string"
|
||||
? integration.iconUrl
|
||||
: isDarkTheme
|
||||
? integration.iconUrl.dark
|
||||
: integration.iconUrl.light;
|
||||
Reference in new issue
Block a user